calculate tax based on y or N

  • Thread starter Thread starter marsjune68
  • Start date Start date
M

marsjune68

I have a worksheet and I have a cell that calculates tax. the formula for
that cell works. but I want it to calculate the tax if in another cell i put
a y and to not calculate if I put a N. if I do say it non taxable I want a
value of $0.00 the tax cell is a currency format.

here is my tax formula (located in colum N) =SUM(C3,I3,E3,J3,)*8.5%
In Cloum M I want to put a "y" or "n" if it is taxable or not
 
Change your tax formula to:
=SUM(C3,I3,E3,J3,)*IF(M3="y",8.5%,0)

Note that I'm assuming y/n are the only two possible choices (and if blank,
no tax).
If this is not the case, expand to:
=SUM(C3,I3,E3,J3,)*IF(M3="y",8.5%,IF(M3="n",0,WhatValueNow))
 
marsjune68 said:
I want it to calculate the tax if in another cell i put a y
and to not calculate if I put a N. if I do say it non taxable
I want a value of $0.00 the tax cell is a currency format.

here is my tax formula (located in colum N) =SUM(C3,I3,E3,J3,)*8.5%
In Cloum M I want to put a "y" or "n" if it is taxable or not

=if(M3="y", sum(C3,I3,E3,J3)*8.5%), 0)

formatted as Currency (click on Format > Cells > Number).

That is probably the easiest to understand and to apply to other similar
problems in the future. But alternatively:

=(M3="y") * sum(C3,I3,E3,J3)

FYI, you could replace SUM(C3,I3,E3,J3) with simply (C3+I3+E3+J3).
Generally, the fewer functions used, the better.

But SUM is useful if any of those cells might contain "", which is not
uncommon.


----- original message -----
 
Back
Top