vlookup

Parra

Well-known Member
Joined
Feb 21, 2002
Messages
752
The formula below works fine.
VLOOKUP(B14,data2002,3,0)
But in some cases the result it #N/A.

Any suggestions on how to remove the #N/A? Anything I can write into the formula.

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
On 2002-09-30 18:45, Parra wrote:
The formula below works fine.
VLOOKUP(B14,data2002,3,0)
But in some cases the result it #N/A.

Any suggestions on how to remove the #N/A? Anything I can write into the formula.

Thanks

=IF(COUNTIF(column2002,B14),VLOOKUP(B14,data2002,3,0),"No match")

where column2002 is the first column of data2002
 
Upvote 0
My suggestion would be to filter the column with the #N/A result by using Data-Filter. Then, click on the drop down arrow and choose #N/A from the list. Highlite the range, hit the F5 key, choose Special,choose visible cells, choose OK. Then, hit the Delete key. This should delete all #N/A values in the highlited range.

Hope this helps.
Mike
 
Upvote 0
On 2002-09-30 18:45, Parra wrote:
The formula below works fine.
VLOOKUP(B14,data2002,3,0)
But in some cases the result it #N/A.

Any suggestions on how to remove the #N/A? Anything I can write into the formula.

Thanks

Three efficient options...

(1)

=IF(ISNA(SETV(VLOOKUP(B14,data2002,3,0))),"",GETV())

which requires the morefunc.xll add-in, downloadable from

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

(2)

=IF(ISNUMBER(MATCH(B14,INDEX(data2002,0,1),0)),VLOOKUP(B14,data2002,3,0),"")

(3) If you can't add morefunc for some reason, use the following UDF to your WB:

Public Function V(Optional vrnt As Variant) As Variant
'
' Stephen Dunn
' 2002-09-12
'
Static vrntV As Variant
If Not IsMissing(vrnt) Then vrntV = vrnt
V = vrntV
End Function

=IF(ISNA(v(VLOOKUP(B14,data2002,3,0))),0,v())
 
Upvote 0

Forum statistics

Threads
1,218,560
Messages
6,143,204
Members
450,469
Latest member
brent3162

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