SOLVED

New Contributor

# Nested IF and MAX statements

I am trying to combine and IF and MAX statement. If J2=MIDPOINT I want the answer to be the higher of M2 or H2, IF J2=Entry I want the answer to be the higher of H2 or L2. I keep getting a FALSE response after the first statement. I realize that it is reading the first IF of the formula and then saying its not midpoint so it is not moving to the 2nd If statement. How do I change the formula to get past the first if statement if false and then move to the 2nd IF statement.

 H2 J2 L2 M2 Answer \$48,150 10 Midpoint 30 \$29,300 \$36,573 \$43,846 \$48,150 \$42,016 3 Entry 30 \$29,300 \$36,573 \$43,846 FALSE

=IF(J2="midpoint",MAX(H2,M2,IF(J2="entry",MAX(H2,L2))))

2 Replies
best response confirmed by Sergei Baklan (MVP)
Solution

# Re: Nested IF and MAX statements

The closing parentheses aren't placed entirely correctly.

=IF(J2="midpoint",MAX(H2,M2),IF(J2="entry",MAX(H2,L2),""))

# Re: Nested IF and MAX statements

That worked, thanks.