Subtoatal

H

Hassan

Hi All,

As figure shown below I want the subtoatal shown on right side of figure
column, to be automatically calculated by Excel Formula

Col. A Col. B
120
120 240

24
10
19
17 70

25
28 53
 
B

Bernie Deitrick

In B2, use the formula

=IF(A3="",SUM(A$1:A2)-SUM(B$1:B1),"")

and copy down column B to match column A.

HTH,
Bernie
MS Excel MVP
 
H

Hassan

Dear Bernie,

Thanks for response, I got only grand total on the end. Please advice me to
get the total of above no. on right cell if cell vale is 0 and the next
subtotal.
 
B

Bernie Deitrick

Hassan,

Then your seemingly blank cells are not blank. Change the formula to

=IF(A3=XXXX,SUM(A$1:A2)-SUM(B$1:B1),"")

where you replace XXXX with the cell address of one of the 'blank' cells of column A, using the
absolute form - eg...

$A$4

like so:

=IF(A3=$A$4,SUM(A$1:A2)-SUM(B$1:B1),"")

HTH,
Bernie
MS Excel MVP
 
H

Hassan

Thanks Bernie, its working fine.
Thanks again.

Bernie Deitrick said:
Hassan,

Then your seemingly blank cells are not blank. Change the formula to

=IF(A3=XXXX,SUM(A$1:A2)-SUM(B$1:B1),"")

where you replace XXXX with the cell address of one of the 'blank' cells of column A, using the
absolute form - eg...

$A$4

like so:

=IF(A3=$A$4,SUM(A$1:A2)-SUM(B$1:B1),"")

HTH,
Bernie
MS Excel MVP
 
Top