Auto Sum in Grand Total Row

Gaura215

Board Regular
Joined
Feb 2, 2011
Messages
97
Hello

I have a spreadsheet, in which I have 3 tables in coloum I:N. Rows of these tables varies depending upon the data in the table. I need a macro which auto sums in the grand total row (Last Row of Each Table) for the data in the respective table.

The code that I am using is giving me an auto sum in the next balnk cell, but I want it to be in Grant Total row only. There may be gaps in the table.

As of now I am using the following code:

Sub Slide07_Global_AutoSum()

For Each NumRange In Columns("I:N").SpecialCells(xlConstants, xlNumbers).Areas
SumAddr = NumRange.Address(False, False)
NumRange.Offset(NumRange.Count, 0).Resize(1, 1).Formula = "=SUM(" & SumAddr & ")"
c = NumRange.Count
Next NumRange

NoData:
Call Slide06_SEMEA

End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,215,584
Messages
6,125,678
Members
449,248
Latest member
wayneho98

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top