#n/a in Vlookup

russelldt

Board Regular
Joined
Feb 27, 2021
Messages
158
Office Version
  1. 365
Platform
  1. MacOS
My problem is as follows.

Have a number in cell B2 (on Sheet 1), and i have an array (Sheet 3, $A$2 to $B$127). The number in Cell B2 may or may not appear in column 1 of the array. If it does, i need the number in column 2 of the array, as the answer to my lookup. The numbers in column 2 of the array are 0 or 1.

The formula only gives me the correct result, when the conditions are met, i.e. there is a corresponding number in column 1 and cell B2, in all other instances the answer is #N/A. I would like a blank or 0 as the answer.

=VLOOKUP(B2,Sheet3!$A$2:$B$127,1,FALSE)

Any help would be appreciated
 

Attachments

  • 1639756628488.png
    1639756628488.png
    768 bytes · Views: 7

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try:
Libro2
ABC
1
28812345
3
Hoja1
Cell Formulas
RangeFormula
C2C2=IFERROR(VLOOKUP(B2,Sheet3!$A$2:$B$127,2,0),0)
 
Upvote 0
IMO, I like the IFNA option a little better here, and that is targeted just to the specific ISNA error.
The IFERROR is a blanket that covers all errors, so if you had made a mistake in entering your formula (so that you get others errors), those would be ignored too (and you may not be aware that you made a typo).
 
Upvote 0
Upvote 0
You are welcome. Glad we were able to help!
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,472
Members
449,087
Latest member
RExcelSearch

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