Columns
A: Name of the person
E: Year
F: Status
J: Value to check
I am attempting to find the largest value, based on several criteria. This formula always returns 0.
=MAX(IF(AND($A$2:$A1500="Bob",$F$2:$F$1500="Active", OR($E$2:$E$1500="All",$E$2:$E$1500="2012")), $J$2:$J$1500, 0))
If I remove the MAX and put the rest of the formula on each row, it returns the correct value for each row.
=IF(AND(A2="Bob", F2="Active", OR(E2="All",E2="2012")), J2, 0)
If I remove $A$2:$A1500="Bob" from the original formula, instead of 0, it returns the largest value in the list as if the IF statement wasn't there. The row with the maximum value in the last does not match any of the IF criteria.
=MAX(IF(AND($F$2:$F$1500="Active", OR($E$2:$E$1500="All",$E$2:$E$1500="2012")), $J$2:$J$1500, 0))
Any suggestions anyone can offer would be greatly appreciated.
Thanks!
Bookmarks