+ Reply to Thread
Results 1 to 5 of 5

Compare cell from two sheets, copy entire row to current sheet

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    US
    MS-Off Ver
    Excel Office 365
    Posts
    56

    Compare cell from two sheets, copy entire row to current sheet

    I have some data in column A of sheet 2. What I need is to copy over every row on sheet 1 that matches A2 sheet 2 to B2:B(till end) of sheet 1. Once done with cell A2 of sheet 2 go to cell A3 and do the same appending to the rows on sheet 2. Continue till the end of data on sheet 2. Attached is what my file currently looks like.compare-copy-row.xlsx

  2. #2
    Registered User
    Join Date
    02-27-2014
    Location
    Range("A1")
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Compare cell from two sheets, copy entire row to current sheet

    I don't completely understand your question, the code will look into every cell in column A Sheet2, if it matches the adjacent cell in column B Sheet1, then it will copy the adjacent data from column C:G Sheet1 to A2 Sheet2:
    Please Login or Register  to view this content.
    ZAX
    I'm glad you got it to work :-D
    ZAX

  3. #3
    Registered User
    Join Date
    06-07-2012
    Location
    US
    MS-Off Ver
    Excel Office 365
    Posts
    56

    Re: Compare cell from two sheets, copy entire row to current sheet

    Zax, I think it's close but when I ran your code in the file I uploaded it stopped after the first line.

  4. #4
    Registered User
    Join Date
    02-27-2014
    Location
    Range("A1")
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Compare cell from two sheets, copy entire row to current sheet

    Quote Originally Posted by nguerra View Post
    Zax, I think it's close but when I ran your code in the file I uploaded it stopped after the first line.
    Would you please give me more information? you want the code to check if the value ** column A Sheet2 is identical with the ADJACENT cell from column B Sheet1 to copy the data ** C:G from sheet1?
    That's what the code does
    ZAX

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,356

    Re: Compare cell from two sheets, copy entire row to current sheet

    Hi nguerra,
    maybe so
    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)

Similar Threads

  1. Replies: 10
    Last Post: 02-20-2014, 04:09 PM
  2. [SOLVED] I need to search for a word on multiple sheets and copy the entire row to a new sheet
    By jkm750 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2013, 12:13 AM
  3. If cells match from two sheets, copy entire row to new sheet function
    By Ckapp22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2012, 05:36 AM
  4. Compare Value between 6 sheets and copy the highest value into different sheet
    By djmal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2010, 05:00 AM
  5. Compare a value with value in other sheets and then COPY data into a sheet.
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2009, 03:05 PM

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