+ Reply to Thread
Results 1 to 2 of 2

Loop with lookup on first match

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2007
    Posts
    1

    Loop with lookup on first match

    I found a thread for a loop function that works like vlookup (thank you for the code, MickG). This code finds every match in the lookup range, but I only want it to find the first match and then loop to the next value to look up. Here is the code:

    Please Login or Register  to view this content.
    When the value from the first cell in Rng is found in the oDat range, I want it to execute the code on that cell in the oDat range and then loop back to the second cell in Rng and execute the code on the first value it finds in the oDat range, etc. This code finds every match from the first cell in Rng in the oDat range and executes the code on every match.

    Thank you in advance for your help.

  2. #2
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: Loop with lookup on first match

    Hello
    Why not use a VLOOKUP if you want to find the first in a colmn?
    Regards
    Peter

+ 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