# Vlookup not working properly

#### Sphinx404

##### Board Regular
I have had the same issue for several days now and I cannot for the life of me figure out why I am returning the wrong data.

I'm using VLOOKUP to match the serial #s in one spreadsheet with others in another spreadsheet that have our SAP #s attached to those. However, I am getting a return of SAP #s, but every single SAP # is being attached to the wrong serial #.

For Example:

Serial #: 337261 is being matched with SAP # 232724
But that is incorrect, the correct SAP # for that serial # is 235841

I have cleaned the data, trimmed the data. The data I want is original and not being pulled from a different spreadsheet... This to me seems pretty basic, however it continues to return the wrong information.

Here's the formula:

=VLOOKUP(G2,'Prod Sched'!B:C,2)

I don't think it should matter, but there are over 5,000 rows of data, however, I'm only using VLOOKUP in 2 different columns. Anyone have an idea of what is happening here?

### Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Trythis with the fourth argument, exact match.

=VLOOKUP(G2,'Prod Sched'!B:C,2,0)

Also, your serial number will need to be unique, no dupes, or it will return the first match only.

Howard

Try

=VLOOKUP(G2,'Prod Sched'!B:C,2,0)

You know.... When using the formula function that excel provides, it would be nice that they put in the "0" for you, it didn't even cross my mind. I should stick to typing out my own functions instead of letting excel input the formula for you.

Worked flawlessly guys. Thanks for your help.

You're welcome.

the data should sorted in ascending order

Replies
13
Views
574
Replies
19
Views
420
Replies
14
Views
399
Replies
10
Views
300
Replies
5
Views
420

1,207,392
Messages
6,078,223
Members
446,323
Latest member
fishezuk

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back