Excel - Vlookup help/question

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
So i cant figure this out. Ive used vlookups a lot and ive never seen this

I have a master sheet of data and i want to pull specific data out of it into another sheet. The data in the master sheet is sorted by date so the value im looking for lets call it "test1" is kind of all over the place in col A

I set my formula to

VLOOKUP($B$1,'mastersheet'!$A3:$O2030,C$2,FALSE)

Where C2 is the column in looking into

I have this formula copied from Cols A-O in the sheet i want to pull data into and C2 indexes to match the colums i want

The issue im having is that i get duplicate values where i should not
Each instance of "test1" has a ID number that goes with it that is in colD, these Simply index as ID_1, ID_2 and so on

the lookup returns the first 15 instances of "Test1" just fine, they are IDs ID_1-ID_15
after those first 15 instances of Test1 in the master sheet there are 7 instances of "test 2" and then "test1" starts again

when test1 starts again it is at ID_23. however what happens in the sheet im looking into is that i get the first 15 IDs just fine and then ID23 repeats 8 times before going to ID_24

anyone have any idea why thats happening?

its almost like its making an entry for every row where "test1" is not found
 

postmark

Senior member
May 17, 2011
307
0
0
So i cant figure this out. Ive used vlookups a lot and ive never seen this

I have a master sheet of data and i want to pull specific data out of it into another sheet. The data in the master sheet is sorted by date so the value im looking for lets call it "test1" is kind of all over the place in col A

I set my formula to

VLOOKUP($B$1,'mastersheet'!$A3:$O2030,C$2,FALSE)

Where C2 is the column in looking into

I have this formula copied from Cols A-O in the sheet i want to pull data into and C2 indexes to match the colums i want

The issue im having is that i get duplicate values where i should not
Each instance of "test1" has a ID number that goes with it that is in colD, these Simply index as ID_1, ID_2 and so on

the lookup returns the first 15 instances of "Test1" just fine, they are IDs ID_1-ID_15
after those first 15 instances of Test1 in the master sheet there are 7 instances of "test 2" and then "test1" starts again

when test1 starts again it is at ID_23. however what happens in the sheet im looking into is that i get the first 15 IDs just fine and then ID23 repeats 8 times before going to ID_24

anyone have any idea why thats happening?

its almost like its making an entry for every row where "test1" is not found

Would you be able to give an example sheet with sanitized data? i'm very confused about the layout of your sheets.