I want my lookup to say 0 if it can't find anything - help!

Helen

Board Regular
Joined
Feb 19, 2002
Messages
103
I am trying to do a simple lookup, but if it can't find what I'm looking up it results in #N/A.

I know it's possible, but just can't think how!

Is it possible to put an IF statement with it?

I know there are functions like ISERROR/ISNA etc, but I really just don't understand when these should be used, and have even been on the helps pages, but I still don't understand them !

Thanks for your help

Helen
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
On 2002-04-10 06:30, Helen wrote:
I am trying to do a simple lookup, but if it can't find what I'm looking up it results in #N/A.

I know it's possible, but just can't think how!

Is it possible to put an IF statement with it?

I know there are functions like ISERROR/ISNA etc, but I really just don't understand when these should be used, and have even been on the helps pages, but I still don't understand them !

Thanks for your help

Helen

Look at my post at:

Look at this:
http://www.mrexcel.com/board/viewtopic.php?topic=4277&forum=2

Aladin
 
Upvote 0
Good question,

I assumed that:
=IF((VLOOKUP(D4,$A$1:$B$10,2,FALSE))="#N/A",0,(VLOOKUP(D4,$A$1:$B$10,2,FALSE)))

but it doesn't?

Boz
 
Upvote 0
On 2002-04-10 09:39, bozack wrote:
Good question,

I assumed that:
=IF((VLOOKUP(D4,$A$1:$B$10,2,FALSE))="#N/A",0,(VLOOKUP(D4,$A$1:$B$10,2,FALSE)))

but it doesn't?

Boz

Boz, watch your data types... "#N/A" isn't the same as #N/A. Although I abhor :rolleyes: this solution, the correct formula would be...

IF(ISNA(VLOOKUP(D4,$A$1:$B$10,2,FALSE)),0,VLOOKUP(D4,$A$1:$B$10,2,FALSE))
This message was edited by Mark W. on 2002-04-10 09:47
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,037
Members
448,543
Latest member
MartinLarkin

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