+ Reply to Thread
Results 1 to 4 of 4

Matching columns between work sheets

  1. #1
    Registered User
    Join Date
    04-19-2007
    Location
    UK
    Posts
    4

    Matching columns between work sheets

    Hi all,

    I've been struggling with a macro and decided it's beyond me. What I need to do is this;

    For each value in column A of sheet 1
    If that value is present somewhere in column A of sheet 2 then
    copy that whole row (from sheet2) into sheet3
    Else
    do nothing
    next value

    So in sheet3 I should end up with all of the rows from sheet2 where the value in the A column was found in column A of sheet1.

    I'm not asking anyone to write the macro for me, but I need some help on how to do it. I've tried using the two LOOKUP commands but I'm not getting anywhere fast.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Use the Find method, not VLOOKUP.

  3. #3
    Registered User
    Join Date
    04-19-2007
    Location
    UK
    Posts
    4
    Got it. I used this type of lookup taken from another thread;

    =IF(ISERROR(MATCH(A1,B1:B100,0)),"Unique","Match")

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    That's a worksheet function construct, not a VBA construct.

+ 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. hiding / showing columns...
    By LSB M in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-07-2008, 05:50 PM
  2. how to collect data from other work sheets
    By drgogo in forum Excel General
    Replies: 3
    Last Post: 02-12-2008, 09:55 AM
  3. Matching two columns
    By g-c in forum Excel General
    Replies: 3
    Last Post: 06-14-2007, 01:54 AM
  4. Function for recognizing matching text and adding up columns
    By grafx77 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-09-2007, 12:02 AM
  5. Replies: 1
    Last Post: 09-19-2006, 02:02 AM

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