Thread: Subtoatal
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Subtoatal

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" wrote in message
...
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.


"Bernie Deitrick" wrote:

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


"Hassan" wrote in message
...
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