When Vlookup doesn't find a value I want zero to be entered

Caleb

New Member
Joined
Sep 10, 2002
Messages
4
Is there any way to replace #N/A with
zero(s)? I tried using find/replace under edit (doesn't work)..... The #N/A are present because Vlookup didn't find matching numbers.... Basically, what I want to do is whenever Vlookup doesn't find a value I want zero to be entered into that cell.....
Any help would be greatly appreciated...
Thanks Caleb Shanafelt...
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
change your lookup...

if(iserror(vlookup(blah,blah,blah,blah),0,vlookup(blah,blah,blah,blah))
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
On 2002-09-12 11:00, Caleb wrote:
Is there any way to replace #N/A with
zero(s)? I tried using find/replace under edit (doesn't work)..... The #N/A are present because Vlookup didn't find matching numbers.... Basically, what I want to do is whenever Vlookup doesn't find a value I want zero to be entered into that cell.....
Any help would be greatly appreciated...
Thanks Caleb Shanafelt...

If you need exact match, the following will give you 0 instead of #N/A...

=IF(ISNUMBER(MATCH(lookup-value,(INDEX(LTable,0,1),0)),VLOOKUP(lookup-value,LTable,ColIdx,0),0)

where LTable is the name that you assign to your lookup table. The 0 as the last argument in MATCH and VLOOKUP means FALSE to Excel

If you install morefunc.xll, which is an free add-in, you can use...

=IF(ISNA(SETV(VLOOKUP(...))),0,GETV())

Both ways you have an efficient formula qua speed.
 

Caleb

New Member
Joined
Sep 10, 2002
Messages
4
Hey thanks Lasw10..... it worked like a charm... and thanks for being so prompt....
I really appreciate it....
Caleb Shanafelt
 

Forum statistics

Threads
1,148,037
Messages
5,744,450
Members
423,874
Latest member
profak2021

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