VLOOKUP

huorsa

Board Regular
Joined
Feb 15, 2002
Messages
101
I am using the vlookup function and sometimes I get the !#N/A. What can I do to change the !#N/A result for zero.

Thanks
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
On 2002-03-15 13:05, huorsa wrote:
I am using the vlookup function and sometimes I get the !#N/A. What can I do to change the !#N/A result for zero.

Thanks

If your match-type is FALSE, use:

=IF(COUNTIF(D2:D5,A1),VLOOKUP(A1,D2:E5,2,0),0)

where D2:D5 is the range that houses the lookup table, A1 a lookup value, D2:D5 within COUNTIF is the 1st column of the lookup table. By the way, 0 in VLOOKUP stands for FALSE, a shorter way of saying the same.

If your match-type is TRUE, use:

=IF(ISNUMBER(MATCH(A1,D2:D5)),VLOOKUP(A1,D2:E5,2),0)

Aladin
 
Upvote 0
On 2002-03-15 13:05, huorsa wrote:
I am using the vlookup function and sometimes I get the !#N/A. What can I do to change the !#N/A result for zero.

Thanks
=IF(ISNA(yourformula),0,yourformula)
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,186
Members
448,554
Latest member
Gleisner2

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