lookup formula

Shlby6

New Member
Joined
May 9, 2006
Messages
36
hello, i am having a problem with a lookup formula. here is what i have so far.

on sheet 1 i have the following columns

unit # description qty

and on sheet 2 i have the following columns

unit # pd fo cost

i want to get the pd, fo, and cost info on to sheet 1 by using the unit # as reference.

i have the following formula =LOOKUP(A30,sheet2!A$2:$A$672,NBV!$B$2:$B$672) in the next blank column on sheet 1.

this works except, when i have a unit # on sheet 1 (for example 5), but no unit # 5 on sheet 2 it goes to the nearest unit # to 5. I don't know how to make it be an exact match so it matches the unit #'s exactly on both sheets.

any help would be greatly appreciated.

thanks!

shelby
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You need VLOOKUP for that. It has a fourth argument for an exact match:

=VLOOKUP(A30,sheet2!A$2:$B$672,COLUMNS(sheet2!$B$2:$B$672),FALSE)
 

Shlby6

New Member
Joined
May 9, 2006
Messages
36
now it is returning the wrong thing, i can't figure out where it is leading to
thanks!

shelby
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
hello, i am having a problem with a lookup formula. here is what i have so far.

on sheet 1 i have the following columns

unit # description qty

and on sheet 2 i have the following columns

unit # pd fo cost

i want to get the pd, fo, and cost info on to sheet 1 by using the unit # as reference.

i have the following formula =LOOKUP(A30,sheet2!A$2:$A$672,NBV!$B$2:$B$672) in the next blank column on sheet 1.

this works except, when i have a unit # on sheet 1 (for example 5), but no unit # 5 on sheet 2 it goes to the nearest unit # to 5. I don't know how to make it be an exact match so it matches the unit #'s exactly on both sheets.

any help would be greatly appreciated.

thanks!

shelby

If NBV!A:B is sorted in ascending order on column A, invoke:

=IF(LOOKUP(A30,NBV!A$2:$A$672)=A30,LOOKUP(A30,NBV!A$2:$A$672,NBV!$B$2:$B$672),"Not Found")

If sort in ascending order does not hold, try:

=INDEX(NBV!$B$2:$B$672,MATCH(A30,NBV!A$2:$A$672,0))
 

Forum statistics

Threads
1,136,369
Messages
5,675,362
Members
419,565
Latest member
Phil57

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