1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Copy Certain Cells from a Row to a certain Sheet..

Discussion in 'Business Applications' started by Galstar, Feb 14, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. Galstar

    Galstar Thread Starter

    Joined:
    Feb 14, 2007
    Messages:
    23
    no I don't have it. And the place I am working is not buying said program. I just need that last piece to get the formatting from another sheet onto the row I just copied. Then this project is done.
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
     
  3. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    TBH I didn't understand what you were saying before about 2000th row. While you previously had some code concerning row 2000, it didn't actually work. However:

    "So I want to copy the format from row1 in sheet called template to sheet in this formula"

    OK -- so just use Sheets("Template").Rows(1).Copy

    (.)
     
  4. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    OBP would gladly do a sales pitch to them for you. :D
     
  5. Galstar

    Galstar Thread Starter

    Joined:
    Feb 14, 2007
    Messages:
    23
    okay bomb #21.
    The data copies fine, but again given the code doesn't copy the format.
    I must be missing something.
    Here is what I am using......

    'Admit Date
    Cells(ActiveCell.Row, 5).Copy _
    Sheets(Cells(ActiveCell.Row, 2).Value).Range("A" & Rows.Count).End(xlUp).Offset(0, 6)


    Sheets("Template").Rows(1).Copy
    Cells(ActiveCell.Row, 1).PasteSpecial Paste:=xlFormats, Operation:=xlNone, _
    SkipBlanks:=True, Transpose:=False
    Application.CutCopyMode = False

    Data copies the data from sheet1 into the apporiate sheet2(Army,Navy). However the code given doesn't copy the format from row 1 of sheet template.
     
  6. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Is Cells(ActiveCell.Row, 1) the row that you want to paste to?
     
  7. Galstar

    Galstar Thread Starter

    Joined:
    Feb 14, 2007
    Messages:
    23
    No it would be

    Sheets(Cells(ActiveCell.Row, 2).Value).Range("A" & Rows.Count).End(xlUp).Offset(0, 6)
     
  8. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    See attached.

    Template!A1:C1 is some kind of pink, OK?

    Select Weekly Status!A9 (B9 = "Marine").

    Run the macro "CopyFormat" -- Marine!A3:C3 = some kind of pink, yes?

    Perhaps by "format" you mean something else?
     

    Attached Files:

  9. Galstar

    Galstar Thread Starter

    Joined:
    Feb 14, 2007
    Messages:
    23
    perfect!!!!!!!
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/544053

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice