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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
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
 

MikeL

Active Member
Joined
Mar 17, 2002
Messages
464
Office Version
  1. 2013
Platform
  1. Windows
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
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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())
 

Forum statistics

Threads
1,143,921
Messages
5,721,549
Members
422,369
Latest member
redinator

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