lookup formula

Shlby6

New Member
Joined
May 9, 2006
Messages
39
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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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)
 
Upvote 0
now it is returning the wrong thing, i can't figure out where it is leading to
thanks!

shelby
 
Upvote 0
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))
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,216
Members
448,876
Latest member
Solitario

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
Back
Top