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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
change your lookup...

if(iserror(vlookup(blah,blah,blah,blah),0,vlookup(blah,blah,blah,blah))
 
Upvote 0
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.
 
Upvote 0
Hey thanks Lasw10..... it worked like a charm... and thanks for being so prompt....
I really appreciate it....
Caleb Shanafelt
 
Upvote 0

Forum statistics

Threads
1,218,743
Messages
6,144,225
Members
450,531
Latest member
avril18

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