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

Occasional Contributor

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

Hi

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

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

``=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".

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

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

=IF(\$B\$11>0%,IF(\$B\$11<5%,(F20*0),IF(\$B\$11<10%,(F20*1.5),IF(\$B\$11<15%,(F20*2),IF(\$B\$11<20%,(F20*2.5),IF(\$B\$11<100%,(F20*3)))))))

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

=IF(\$B\$11>0%,IF(\$B\$11<5%,(F21*0),IF(\$B\$11<10%,(F21*1),IF(\$B\$11<15%,(F21*1.5),IF(\$B\$11<20%,(F21*2),IF(\$B\$11<100%,(F21*2.5)))))))

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

IF(\$B\$11>0%,IF(\$B\$11<5%,(F22*0),IF(\$B\$11<10%,(F22*0.5),IF(\$B\$11<15%,(F22*1),IF(\$B\$11<20%,(F22*1.5),IF(\$B\$11<100%,(F22*2)))))))

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

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.

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

Thank you this is great!!