+ Reply to Thread
Results 1 to 3 of 3

VLookup Loop until data found?

  1. #1
    Registered User
    Join Date
    09-02-2011
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    1

    VLookup Loop until data found?

    I have been reviewing notes back to 2009 but have not found an answer yet. I have a VLookup formula I need help with. In the enclosed file I collect infraction information (Data tab column D and E) on users. Once enough infractions have occured a level is delivered (Data tab column G).

    On our summary tab I need to be able to pull data into the H column (Comments) from the G column from the data tab for each user. The problem with a basic VLookup is it will return the first entry which in most cases is blank (user has not incurred Level yet). I need a VLookup (or other function) to loop until it finds an entry and returns it to the summary tab.

    Any help would be greatly appreciated!

    Tried
    VLookup and Lookup functions
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: VLookup Loop until data found?

    This maybe?

    =LOOKUP(2, 1/((Data!A:A=A2)*(Data!G:G<>"")), Data!G:G)
    Last edited by zbor; 09-02-2011 at 10:03 AM.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: VLookup Loop until data found?

    Thzat will return you #N/A error if no match..if you want to avoid it yxou can use something like:

    =LOOKUP(REPT("Z",255),CHOOSE({1,2},"",LOOKUP(2,1/((Data!A:A=A5)*(Data!G:G<>"")),Data!G:G)))

+ 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