#N/A

andremayer

Board Regular
Joined
Oct 9, 2008
Messages
60
Hello,

I have a calculation, it works when it finds what I want it to look up which is good, but when it doesn't find what I am looking for, this #N/A shows up. It's messing up with other formulas because of that. So I am wondering how I can fix this so that if it finds what I'm looking for it Puts a 1, if it doesn't it should put a 0.

Here's my formula
=VLOOKUP(K18,DATA!A1:A11470,1,0)

So, I want it to look at a number on one of my sheets, if it finds that number in my DATA sheet, I want it to bring back that number, if it's not in the array (A1:A11470) I want it to say 0

Am I doing this right?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try:

=IF(ISNA(VLOOKUP(K18,DATA!A1:A11470,1,FALSE)),0,(VLOOKUP(K18,DATA!A1:A11470,1,FALSE)))
 
Upvote 0
Sorry, I misinterpreted what you wanted, with COUNTIF you'd need to use this version

=IF(COUNTIF(DATA!A1:A11470,K18),K18,0)
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

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