Baffled comparing two arrays with IF/AND

ejpuck

New Member
Joined
Nov 8, 2011
Messages
15
Hello all,
I am brand new to this board, and my skills are limited. I am having trouble with an IF/And that compares 2 different arrays. The end goal is to determine if there is a spouse, and if that spouse is over 65. If true, I need "1,000" if not, "0".

Array number one is C35:C45 and contains either spouse, child, or nothing.

Array number 2 is I35:I45 and has the age of the corresponding individual from array one.

=IF(C35:C45="spouse","1,000",0) returns true, as does =IF(I35:45>64,"1000",0). But when I entered the same statements as an AND... =AND(C35:45="spouse","1,000",0) even though one of the cells was true, the formula returned false.

So of course when I tried to nest the if/and =IF(AND(C35:C45="spouse",I35:45>64),"1,000",0 it comes back false. Right now c35 says spouse, and I35 says 80.

What am I doing wrong, and how should I write this so it works.
 

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).
Maybe

=1000 * sumproduct((C35:C45="spouse")*(I35:I45>=65))
 
Upvote 0
oops, OK, I forgot a very important piece. The answer returned is going to be a different cell reference if true. 1000 is not static. If there is a spouse, and the spouse is 65 or older, then I need a return of E9
 
Upvote 0
AND evaluates all of its arguments;

AND(C35:C45="spouse", I35:I45>64)

... would return TRUE if all of C were 'spouse" and all of I were > 64 (and if it were entered as an array formula).
 
Upvote 0

Forum statistics

Threads
1,224,899
Messages
6,181,627
Members
453,058
Latest member
rmd0725

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