ISNA error

PM1

Board Regular
Joined
Oct 28, 2005
Messages
192
I have the following formula:

=IF(J15<"10/10/05",VLOOKUP(E15,'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,5,FALSE),IF(J15>"11/10/05"<"19/10/05",VLOOKUP(E15,'Pricing 10th Oct - 19th Oct'!$B$12:$F$148,5,FALSE),IF(J15>"19/10/05",VLOOKUP(E15,'Pricing 20th Oct - 31st oct'!$B$12:$F$150,5,FALSE))))

which is producing the correct result when the search criteria is found, the problem is that I am getting #N/A where the result is not found. I have tried using if(isna) but to no avail. I got it to work with:-

=IF(ISERROR((IF(J175<"10/10/05",VLOOKUP(E175,'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,5,FALSE),IF(J175>"11/10/05"<"19/10/05",VLOOKUP(E175,'Pricing 10th Oct - 19th Oct'!$B$12:$F$148,5,FALSE),IF(J175>"19/10/05",VLOOKUP(E175,'Pricing 20th Oct - 31st oct'!$B$12:$F$150,5,FALSE)))))),"- NOT on ATLAS",(IF(J175<"10/10/05",VLOOKUP(E175,'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,5,FALSE),IF(J175>"11/10/05"<"19/10/05",VLOOKUP(E175,'Pricing 10th Oct - 19th Oct'!$B$12:$F$148,5,FALSE),IF(J175>"19/10/05",VLOOKUP(E175,'Pricing 20th Oct - 31st oct'!$B$12:$F$150,5,FALSE))))))

but this seems unmanageable.

All I want to do is select a value and it's date in Sheet 1, look for it's value within the date period in either sheets 2,3 or 4 and return a result.

There must be an easier way to do this.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You never tell it what to do if the value is not found.

before the last ')' put what you want to see if the value does not meet any of the three criteria

,0
,""
,"Not Found"
etc.
 
Upvote 0
Not quite, cfree. If no third option is given to the IF function, FALSE (not #N/A) is returned as a default. [Consider =IF(1>2, "This is correct")]

PM's problem is how to handle the vlookups. Consider something like:

if(ISNA(match(E15,'Pricing 26 Aug - 10th Oct'!$B$12:$B$148,0)),"Bad entry",VLOOKUP(E15,'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,5,FALSE))

instead of:

VLOOKUP(E15,'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,5,FALSE)

etc.
 
Upvote 0
You have other things to worry about too ... is the entry in J15 a date? If so, you shouldn't be comparing it to text strings, but to DATEVALUE("10/10/05") and so on. And logic tests like :
Code:
J15>"11/10/05"<"19/10/05"
are nonsense. You should be using the AND function in cases like that.
 
Upvote 0
GlennUK,

Yes "J15" is a date and I think you are correct as far as the logic tests are concerned, I have just found that it's only looking at the first lookup statement and producing the result from that.

Now I'm really lost on how to convert the Column to DATEVALUE let alone use the AND() Function as well.
 
Upvote 0
PM1 said:
I have the following formula:

=IF(J15<"10/10/05",VLOOKUP(E15,'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,5,FALSE),IF(J15>"11/10/05"<"19/10/05",VLOOKUP(E15,'Pricing 10th Oct - 19th Oct'!$B$12:$F$148,5,FALSE),IF(J15>"19/10/05",VLOOKUP(E15,'Pricing 20th Oct - 31st oct'!$B$12:$F$150,5,FALSE))))...

Assuming that the result is a number when the VLOOKUP formula succeeds...

=LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,VLOOKUP(E15,CHOOSE(MATCH(J15,{0,38636,38645}),'Pricing 26 Aug - 10th Oct'!$B$12:$F$148,'Pricing 10th Oct - 19th Oct'!$B$12:$F$148,'Pricing 20th Oct - 31st oct'!$B$12:$F$150),5,0)))
 
Upvote 0

Forum statistics

Threads
1,202,909
Messages
6,052,493
Members
444,587
Latest member
ezza59

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