My subtotal and sum

Anmol786

New member
Joined
Oct 7, 2014
Messages
36
Reaction score
0
Points
0
i have data sheet

then i want to add sum of total data in the next cell of the cell where written "Subtotal"

is there any way to that using excel formula

data sheet is attached here
 

Attachments

  • Subtotal.xlsx
    7.9 KB · Views: 16
Hi

You have formulae inserted which does this for you. apart from in section 2, your formula is creating a circular reference.
It should be
=SUM(E4:E6) and not =SUM(E4:E7)

If you are saying that you want the formula to appear any time you insert the Subtotal in the first column, then that could only be achieved with VBA.

However, if you makes each data set into a Table with Insert tab > Table > my table has headers after you have given a title to each of the lcells to the left of "rs.",
then when you cursor is anywhere within the Table created, if you clcik on the Design tab, you can select Total row from the Table Style Options section
This will place a Total row at the end of your table, which will move down and adjust as you insert more rows.
When you press Tab, after entering values in the rs column, Excel will automatically insert a new row above the total row, adjust the formula and put you in the first cell of the new row.

See attached file for examples
 

Attachments

  • Subtotal #2.xlsx
    10.4 KB · Views: 12
Hi Anmol786, not certain what you need but how about placing this into cell B4 and copying/pulling down:
=IF(A4="Subtotal",SUM(B$3:B3),"")
Then type your data over the formula and when you finish put Subtotal in column A and you answer will appear.
 
Hi Anmol786, not certain what you need but how about placing this into cell B4 and copying/pulling down:
=IF(A4="Subtotal",SUM(B$3:B3),"")
Then type your data over the formula and when you finish put Subtotal in column A and you answer will appear.


Sir

but if i wrire subtotal in any cell then the sum total should appear in the next cell to it.

A3=Subtotal B3=43
A4=Subtotal B4=43

If B4=Subtotal C4=43

plz how to that
 
Sir

but if i wrire subtotal in any cell then the sum total should appear in the next cell to it.

A3=Subtotal B3=43
A4=Subtotal B4=43

If B4=Subtotal C4=43

plz how to that

and if possible give formula in vba but tell me how to run it

thanks
 
Back
Top