+ Reply to Thread
Results 1 to 2 of 2

Inspect 2 lists for matches.

  1. #1
    Registered User
    Join Date
    08-31-2006
    Posts
    2

    Inspect 2 lists for matches.

    Thank you for reading this.
    I have two lists to compare.
    The first is a list of 4500 serial numbers I have.
    The second is a list of 121 serial numbers that may or may not exist in the first list.
    Using a loop structure I would like to take the first serial number from the second list and compare it agenst the 4500 items in the first list. If a match is made I would like to mark the second list with the row of the hit in the first list. I think, after alot of reading it should look like this, but I am not sure. Can someone help me?

    Do while ( not at the end of list 2 ) // starting from the top of the
    // second list grab a serial number.
    Do while ( not at the end of list one )
    if list 2 number = list 1 number print the row number next to the
    list 2 number.
    if list 2 number does not = list 1 number get another number
    from list 1.

    Thank you.

  2. #2
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    Hi,

    A macro is not needed for this, it can be done with a single formula, for example:

    =match(('Little List'!a1,'Big List'!$a$1:$a$4500,0)

    Copy this down for the 121 rows in the small list & hey presto!

    hth
    Rob Brockett
    NZ
    Always learning & the best way to learn is to experience...

+ 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