# lookup formula

#### Shlby6

##### New Member
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

#### Brian from Maui

##### MrExcel MVP
Have a look at VLOOKUP setting the 4th argument to 0 (False) for an exact match.

#### Andrew Poulsom

##### MrExcel MVP
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
now it is returning the wrong thing, i can't figure out where it is leading to
thanks!

shelby

#### Aladin Akyurek

##### MrExcel MVP
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))

#### Shlby6

##### New Member
great, that worked. thanks so much

shelby

Replies
5
Views
177
Replies
14
Views
536
Replies
2
Views
141
Replies
6
Views
140
Replies
6
Views
120

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

### 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