# Thread: My subtotal and sum

1. ## My subtotal and sum

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  Reply With Quote

2. 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  Reply With Quote

3. 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.  Reply With Quote

4. Originally Posted by Beamer 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  Reply With Quote

5. 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  Reply With Quote

6.  Reply With Quote

7.  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•