Subtoatal

  • Thread starter Thread starter Hassan
  • Start date Start date
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
 
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
 
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.
 
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
 
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
 
Hassan,

That's great. You're quite welcome.

Bernie
MS Excel MVP
 

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

Similar Threads

Sum 7
Difference in time 7
Array Constant 3
WCG Stats Saturday 29 July 2023 3
WCG Stats Monday 27 December 2021 1
WCG Stats Tuesday 22 August 2023 3
Total 1
WCG Stats Wednesday 05 July 2023 3

Back
Top