View Single Post
  #6   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

I see...

E31: Subtotal
F31:

=SUM(F22:F30)

E32: Taxable Subtotal
F32:

=SUMIF(E22:E30,"T",F22:F30)

E33: Tax1
F33:

=F32*7%

E34: Tax2
F34:

=SUM(F32:F33)*7.5%

E35: Total Tax
F35:

=F33+F34

E36: Total
F36:

=SUM(F32:F34)+F31-F32

Peter wrote:
Hi Aladin:

Thanks for answering my question.

Your solution would be correct, if there is always a tax to calculate.
However, the calculation should only be done if there is a T in Column E.

Let me try to show an example; my explanation was not too clear:

Col D Col E Col F
(Price) (Taxable?) Amount

Row 22 75 T 75
Row 23 25 T 25
Row 24 10 10
Row 30 - - -
Row 31 Subtotal 110.00 (=SUM F22:F30)
Row 32 Tax1 7% 7.00 (100*7%; no tax on 10)
Row 33 Tax2 7.5% 8.03 (100+7)*7.5%
Row 34 Total Tax 15.03 (=SUM F32:F33)
Row 35 Total 125.03 (115.03 +10)

Formula for Tax1: =7%*SUMIF(E22:E30,"T",F:22:F30) -- This works OK. If
there's a T somewhere in column E, it calculates the tax; otherwise, it
returns nothing

?Formula for Tax2?: =7.5%*SUMIF(E22:E30,"T",F31:F32) -- This does not work;
it always returns a value, even if there is no T in Column E; the value is
also calculated on the Subtotal, not on the Subtotal + Tax1