Help with if text is "x" us x formula, if text is "y" use y formula etc.

Occasional Contributor


I need help with a formula. 

If the cell has the text "manager" use the manager formula, if the text is "assistant manager" use the assistant manager formula, and the same for Lead advisor and sales advisor.



4 Replies


=IF(A4="Manager",SUM($C$1:$C$2),IF(A4="Assistant Manager",SUM($C$2:$C$3),IF(A4="Sales Advisor",SUM($C$3:$C$4),IF(A4="Lead Advisor",SUM($C$4:$C$5)))))

Is this what you are looking for? For this example i used short formulas such as SUM($C$1:$C$2) for "manager". 

@Quadruple_Pawn not quite ,I need it to get the formula to recognize if the text is 'Manager' to use this formula:


but if the text is 'Assistant Manager' to use this formula:


and if the text is 'Lead Advisor' and or 'Sales Advisor' to use this formula:



I didn't want to type all the long nested IF formulas and therefore suggested an easier example with simple SUM formulas.


In the attached file i entered your nested IF formulas and this seems to work if i correctly understand what you want to do.