Change formula based upon value of a different cell

S

Steve

In cell E2, I would like a formula which will generate a "Y" if the item in
cell C2 is taxable, and a "N" if the item in cell C2 is not taxable .
The items that are not taxable in cell C2 is either "EVERGREEN", "METRO",
"RAILPOOL", or "SEACASTLE"; all other items are taxable.

Then, if there is a "Y" in E2, the formula in F2 would be "=(A2+B2)*1.07"
If there is "N" in E2, the formula in F2 would be just "=(A2+B2)"

Thanks for any assistance...
 
P

Pete_UK

You could put this in E2:

=IF(C2="","",IF(OR(C2="Evergreen",C2="Metro",C2="Railpool",C2="Seacastle"),"N","Y"))

to return Y or N as appropriate as long as C2 is not empty. Put this
one in F2:

=IF(E2="","",IF(E2="Y",(A2+B2)*1.07,A2+B2))

You will again get a blank returned if E2 (and thus C2) is blank,
otherwise your calculated values.

Hope this helps.

Pete
 
F

Fred Smith

E2: =if(or(c2="evergreen",c2="metro",c2="railpool",c2="seacastle"),"Y","N")
F2: =(a2+b2)*(1+if(e2="y",.07,0))

Suggestion:
Instead of the long If statement in E2, use a lookup table. Then when your
products change, or the tax rate changes, you don't have to change any
formulas. Checkout Vlookup in Help.

Regards,
Fred.
 
R

RagDyer

In E2:

=IF(OR(C2={"Evergreen","Metro","Railpool","Seacastle"}),"N",IF(C2="","","Y"))

In F2:

=(E2="N")*(A2+B2)+(E2="Y")*(A2+B2)*1.07
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top