help needed with vlookup?

wylie88

New Member
Joined
Jan 25, 2005
Messages
3
Im useing this formula in my system and when there is nothing in B5 it just comes up as NA. is there any way to stop this from happening?


=VLOOKUP(B5,'Product database'!C2:E24,3,0)

thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

pwchad

New Member
Joined
Jan 31, 2005
Messages
6
=if(iserror(VLOOKUP(B5,'Product database'!C2:E24,3,0)),0,VLOOKUP(B5,'Product database'!C2:E24,3,0))

If you change the 0 for "", it will leave the cell blank.
Or you can put in text to identify errors "Missing"
 
Upvote 0

masim

Board Regular
Joined
Jun 19, 2003
Messages
130
try this:

=if(isna(VLOOKUP(B5,'Product database'!C2:E24,3,0)),"",(VLOOKUP(B5,'Product database'!C2:E24,3,0)))

Regards
Asim
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
wylie88 said:
Im useing this formula in my system and when there is nothing in B5 it just comes up as NA. is there any way to stop this from happening?


=VLOOKUP(B5,'Product database'!C2:E24,3,0)

thanks

If C2:E24 is sorted on C2:C24 in ascending order...

=IF(B5 < INDEX($C$2:$C$24,1,1),"",LOOKUP(B5,'Product database'!$C$2:$C$24)=B5,LOOKUP(B5,'Product database'!$C$2:$E$24))

If C2:E24 is not sorted on C2:C24...

D5:

=IF(B5<>"",VLOOKUP(B5,'Product database'!$C$2:$E$24,3,0),"")

C5:

=IF(ISNA(D5),"",D5)
 
Upvote 0

Forum statistics

Threads
1,195,582
Messages
6,010,577
Members
441,557
Latest member
Jbest23

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