Jun 24 2021 02:07 PM
I have the following formulas that I need to combine and the results in the same column/cell.
=IF(AND(N2>7.6,I2>40),"40",IF(I2<40,I2))
And
=IF(AND(N5=7.5,I5>37.5),"37.5",IF(I5<37.5,I5))
Both formulas work fine separately, but I need them to be in one cell, i.e. combined. How do I accomplish this?
Jun 25 2021 06:35 AM
It very depends on which logic you'd like to use combining conditions. As variant
=IF(AND(N2>7.6,I2>40), 40,
IF(I2<40, I2,
IF(AND(N5=7.5,I5>37.5), 37.5,
IF(I5<37.5, I5,
"nothing"
))))
Jul 20 2021 07:41 AM
Thanks this seems to be working except the IF(AND(N5=,I5>37.5), 37.5 is not returning 37.5 in the cell if I5>37.5. Am I doing something wrong?
Jul 20 2021 08:20 AM
Perhaps since I2<40, when formula returns I2. Formula can't return both I2 and result of next condition, only one of them. We may only change priority, first check N5 & I5, next I2. But I don't know which logic you assume.
Jul 20 2021 08:48 AM
@Sergei Baklan I was able to get it to work...Thanks so much for your assistance.