VLOOKUP Problem

Henry G.

New Member
Joined
Feb 18, 2002
Messages
30
In cell B2 have written the formula =VLOOKUP(A1,TABLE1,2,FALSE)

When there is no match for cell A1 in the first column of “table1”, the formula yields “#N/A”. I want to write a formula in cell B2 that will yield zero when no match is found and the value of column 2 in “table1” when there is a match.
THANKS . . .
Henry G.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
On 2002-10-21 09:57, Henry G. wrote:
In cell B2 have written the formula =VLOOKUP(A1,TABLE1,2,FALSE)

When there is no match for cell A1 in the first column of “table1”, the formula yields “#N/A”. I want to write a formula in cell B2 that will yield zero when no match is found and the value of column 2 in “table1” when there is a match.
THANKS . . .
Henry G.

Two fast options...

[1]

=IF(ISNA(VLOOKUP(A1,TABLE1,2,0))),0,GETV())

which requires that you download & install the morefunc.xll add-in, from

http://longre.free.fr/english/index.html

[2]

=IF(ISNUMBER(MATCH(A1,INDEX(TABLE1,0,1),0)),VLOOKUP(A1,TABLE1,2,0),0)
 
Upvote 0
On 2002-10-21 09:57, Henry G. wrote:
In cell B2 have written the formula =VLOOKUP(A1,TABLE1,2,FALSE)

When there is no match for cell A1 in the first column of “table1”, the formula yields “#N/A”. I want to write a formula in cell B2 that will yield zero when no match is found and the value of column 2 in “table1” when there is a match.
THANKS . . .
Henry G.

Why not add the needed records to your table to prevent the return of #N/A, or use an IF function to test the lookup_value and return 0 rather then performing a VLOOKUP?
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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