Combine Multiple IF Formulas

%3CLINGO-SUB%20id%3D%22lingo-sub-2483481%22%20slang%3D%22en-US%22%3ECombine%20Multiple%20IF%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2483481%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20following%20formulas%20that%20I%20need%20to%20combine%20and%20the%20results%20in%20the%20same%20column%2Fcell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(AND(N2%26gt%3B7.6%2CI2%26gt%3B40)%2C%2240%22%2CIF(I2%26lt%3B40%2CI2))%3C%2FP%3E%3CP%3EAnd%3C%2FP%3E%3CP%3E%3DIF(AND(N5%3D7.5%2CI5%26gt%3B37.5)%2C%2237.5%22%2CIF(I5%26lt%3B37.5%2CI5))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBoth%20formulas%20work%20fine%20separately%2C%20but%20I%20need%20them%20to%20be%20in%20one%20cell%2C%20i.e.%20combined.%20How%20do%20I%20accomplish%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2483481%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2485399%22%20slang%3D%22en-US%22%3ERe%3A%20Combine%20Multiple%20IF%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2485399%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1087504%22%20target%3D%22_blank%22%3E%40Denise_Heil%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20very%20depends%20on%20which%20logic%20you'd%20like%20to%20use%20combining%20conditions.%20As%20variant%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(AND(N2%26gt%3B7.6%2CI2%26gt%3B40)%2C%20%20%2040%2C%0A%20IF(I2%26lt%3B40%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20I2%2C%0A%20IF(AND(N5%3D7.5%2CI5%26gt%3B37.5)%2C%2037.5%2C%0A%20IF(I5%26lt%3B37.5%2C%20%20%20%20%20%20%20%20%20%20%20%20%20I5%2C%0A%20%20%20%20%22nothing%22%0A))))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2566178%22%20slang%3D%22en-US%22%3ERe%3A%20Combine%20Multiple%20IF%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2566178%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20this%20seems%20to%20be%20working%20except%20the%26nbsp%3B%20IF(AND(N5%3D%2CI5%26gt%3B37.5)%2C%2037.5%20is%20not%20returning%2037.5%20in%20the%20cell%20if%20I5%26gt%3B37.5.%20Am%20I%20doing%20something%20wrong%3F%3C%2FP%3E%3CPRE%3E%26nbsp%3B%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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?

4 Replies

@Denise_Heil 

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"
))))

@Sergei Baklan 

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?

 

 

@Denise_Heil 

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.

@Sergei Baklan I was able to get it to work...Thanks so much for your assistance.