Vlookup not working properly

Sphinx404

Board Regular
Joined
May 2, 2015
Messages
186
Office Version
  1. 365
Platform
  1. Windows
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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

L. Howard

Well-known Member
Joined
Oct 16, 2012
Messages
4,514
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
 

Sphinx404

Board Regular
Joined
May 2, 2015
Messages
186
Office Version
  1. 365
Platform
  1. Windows
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.
 

gaz_chops

Well-known Member
Joined
Apr 29, 2003
Messages
6,468
Platform
  1. MacOS

ADVERTISEMENT

You're welcome.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,219
Members
417,131
Latest member
Seanr19871

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top