Array Formula not working

cmhoz

Active Member
Joined
Aug 20, 2006
Messages
268
Hello...

I'm trying to do a 'MAX IF' array... and I THINK I have the formula right, but it's returning a #N/A

This is my forumla - and I am remembering to CSE to exit it, etc.

=MAX(IF($A$3:$A$65536=A4,$Q$3:Q$65536,FALSE))

It should definately have an answer for the line I'm testing it on. I thought it was because the values in Q are dates, but I changed them to be straight values and it still returned a #N/A.

Have I missed something??
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi

Two thoughts. If you know the minimum value will be greater than zero (which a date is) then change the FALSE part to 0. {ie zero}

Secondly (at the risk of stating the obvious - forgive me if you have already checked this) check that both columns A and Q do not contain any errors - in particular a "N/A" error.

Andrew
 
Upvote 0
Thanks guys!

Sometimes it's useful to have an extra brain or two.

I did, in fact, have a #N/A in my array. I thought I had checked for them before, so I discounted that as a reason - but there it is!


Thanks!!
 
Upvote 0
Thanks guys!

Sometimes it's useful to have an extra brain or two.

I did, in fact, have a #N/A in my array. I thought I had checked for them before, so I discounted that as a reason - but there it is!


Thanks!!

Both ranges?

You can take that into account in the formula...
Code:
=MAX(
   IF(ISNA($A$3:$A$65536),
   IF($A$3:$A$65536=A4,
     $Q$3:Q$65536)))

Code:
=MAX(
   IF($A$3:$A$65536=A4,
   IF(ISNUMBER($Q$3:Q$65536),
     $Q$3:Q$65536)))

Code:
=MAX(
   IF((1-ISNA($A$3:$A$65536))*ISNUMBER($Q$3:Q$65536),
   IF($A$3:$A$65536=A4,
     $Q$3:Q$65536)))
 
Upvote 0

Forum statistics

Threads
1,214,390
Messages
6,119,235
Members
448,879
Latest member
VanGirl

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