+ Reply to Thread
Results 1 to 7 of 7

Copy row from one worksheet into another

  1. #1
    Registered User
    Join Date
    03-11-2013
    Location
    pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Post Copy row from one worksheet into another

    I have a workbook with a tab called "corrections" and the other tabs are named "5.10.13", "5.9.13", "5.8.13", etc... All worksheets are formatted the same and all columns are named the same.

    what i want is to create a macro so that if data entered into any cell in column K ("Corrections needed"), says "Yes",then i want that entire row to copy into the first blank row on the "corrections" tab.

    Here is what the header row looks like:


    A B C D E F G H I J K
    Current Old Name Bundle Date ID Date Rec' Time Time Rating Qual Rating Comments Corrections Needed


    any assistance would be greatly appreciated....

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy row from one worksheet into another

    I do not know where the header is on your data, so you need to adjust this part of the code
    A3:K
    to either A1, or A2, otherwise the code will either miss 1, or 2 rows, or copy the header


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-11-2013
    Location
    pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy row from one worksheet into another

    CORRECTIONS.xlsm

    ABB Thank you so much for your help, but i am getting a few errors and it is probably from me not explaining the process enough in detail.

    i can see what it is pulling but i am not sure how to refine the outcome.

    when i run the macro here is what is happening:
    1.) it is copying Row 9, and also the drop down boxes for the cells in column H,I,K.
    2.) if a value in column k does read "yes", it is not copying the data over.

    I have attached the spreadhseet, i hope this helps

    So when I hit the Update button, on the Corrections tab, Price and Foster should be copied to rows 3 and 4.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy row from one worksheet into another

    It is one of those days where nothing seems to go right. For some unknown reason to me, the NR empty row shows 3, but it kept overwriting(Copying) in row 2, instead of row3. I have both codes, but none of them work. Unless some one spots my error, I will have a look with fresh eyes in the morning.

    Please Login or Register  to view this content.
    Last edited by AB33; 05-14-2013 at 04:45 AM.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Copy row from one worksheet into another

    just a couple changes
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy row from one worksheet into another

    Jay,
    Thank you very much for your timely intervention!
    Please Login or Register  to view this content.
    does the trick

    Having walking up with fresh eyes, I have spotted my error of lastnight.
    Please Login or Register  to view this content.
    was wrong.
    I have now corrected both codes.

  7. #7
    Registered User
    Join Date
    03-11-2013
    Location
    pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy row from one worksheet into another

    Wow thank you both for help...

    I am very green in VBA, would this code work if i expand the workbook or will I have to change the code and if I do how/where would i change it.

    thank you again, you are a lifesaver!!!!!

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy row from one worksheet into another

    If you want to apply the code across sheets
    Change this line

    Please Login or Register  to view this content.
    INTO

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1