ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Totalling Dynamic Range Subtotals in Excel 2003 (https://www.excelbanter.com/excel-worksheet-functions/184547-totalling-dynamic-range-subtotals-excel-2003-a.html)

max@SATX

Totalling Dynamic Range Subtotals in Excel 2003
 
I have created a VBA function in an Excel 2003 worksheet takes a named range,
copies it, inserts it below the original range and does a re-naming of
specific text in a cell within that range.

I am now attempting to take the sum of a column of cells within the range
and add them to the previous sum of the original cells and total them in a
different named range below all of that. I cannot determine how to add the
two 'sub-totals' into one grand total each time a dynamically created range
is added.

Can someone please assist? Thanks.
--
max@SATX

Pete_UK

Totalling Dynamic Range Subtotals in Excel 2003
 
Use SUBTOTAL(9,range) instead of SUM(range).

Hope this helps.

Pete

On Apr 21, 4:49*pm, max@SATX
wrote:
I have created a VBA function in an Excel 2003 worksheet takes a named range,
copies it, inserts it below the original range and does a re-naming of
specific text in a cell within that range. *

I am now attempting to take the sum of a column of cells within the range
and add them to the previous sum of the original cells and total them in a
different named range below all of that. *I cannot determine how to add the
two 'sub-totals' into one grand total each time a dynamically created range
is added.

Can someone please assist? *Thanks.
--
max@SATX



max@SATX

Totalling Dynamic Range Subtotals in Excel 2003
 
Actually, this helps somewhat, but....it will only total the fist dynamic
range and not subsequent ranges. In other words, the formula carries to a
grand total but when an additional dynamic range is added to the list, it
does not pick up the totals from it. My assumption is that there must be
some kind of 'renaming' effort that needs to happen before the dynamic range
can be copied and then totalled with the other(s). ???
--
max@SATX


"Pete_UK" wrote:

Use SUBTOTAL(9,range) instead of SUM(range).

Hope this helps.

Pete

On Apr 21, 4:49 pm, max@SATX
wrote:
I have created a VBA function in an Excel 2003 worksheet takes a named range,
copies it, inserts it below the original range and does a re-naming of
specific text in a cell within that range.

I am now attempting to take the sum of a column of cells within the range
and add them to the previous sum of the original cells and total them in a
different named range below all of that. I cannot determine how to add the
two 'sub-totals' into one grand total each time a dynamically created range
is added.

Can someone please assist? Thanks.
--
max@SATX




Pete_UK

Totalling Dynamic Range Subtotals in Excel 2003
 
What formulas are you using? You could have:

=SUBTOTAL(9,range1)
=SUBTOTAL(9,range2)
=SUBTOTAL(9,range3)

etc. for each range, and then

=SUBTOTAL(9,A:A)

to get the overall range (assuming they are all in column A). Note
that the subtotals don't have to be in the same column, and the last
one won't work if it is in column A.

Hope this helps.

Pete




On Apr 21, 6:41*pm, max@SATX
wrote:
Actually, this helps somewhat, but....it will only total the fist dynamic
range and not subsequent ranges. *In other words, the formula carries to a
grand total but when an additional dynamic range is added to the list, it
does not pick up the totals from it. *My assumption is that there must be
some kind of 'renaming' effort that needs to happen before the dynamic range
can be copied and then totalled with the other(s). *???
--
max@SATX



"Pete_UK" wrote:
Use SUBTOTAL(9,range) instead of SUM(range).


Hope this helps.


Pete


On Apr 21, 4:49 pm, max@SATX
wrote:
I have created a VBA function in an Excel 2003 worksheet takes a named range,
copies it, inserts it below the original range and does a re-naming of
specific text in a cell within that range. *


I am now attempting to take the sum of a column of cells within the range
and add them to the previous sum of the original cells and total them in a
different named range below all of that. *I cannot determine how to add the
two 'sub-totals' into one grand total each time a dynamically created range
is added.


Can someone please assist? *Thanks.
--
max@SATX- Hide quoted text -


- Show quoted text -



max@SATX

Totalling Dynamic Range Subtotals in Excel 2003
 
Thanks, but this does not answer my dilemma. I am probably not explaining it
very well. When my function runs automatically, it creates a new task
between the first set of tasks and the grand totals. I need the subtotal
function to automatically increase the grand total based upon the addition of
the subtotal from the new task. The question (I think() is, how do I get
Excel to recognize the additional subtotal in the grand total column after
addition of the new task?
--
max@SATX


"Pete_UK" wrote:

What formulas are you using? You could have:

=SUBTOTAL(9,range1)
=SUBTOTAL(9,range2)
=SUBTOTAL(9,range3)

etc. for each range, and then

=SUBTOTAL(9,A:A)

to get the overall range (assuming they are all in column A). Note
that the subtotals don't have to be in the same column, and the last
one won't work if it is in column A.

Hope this helps.

Pete




On Apr 21, 6:41 pm, max@SATX
wrote:
Actually, this helps somewhat, but....it will only total the fist dynamic
range and not subsequent ranges. In other words, the formula carries to a
grand total but when an additional dynamic range is added to the list, it
does not pick up the totals from it. My assumption is that there must be
some kind of 'renaming' effort that needs to happen before the dynamic range
can be copied and then totalled with the other(s). ???
--
max@SATX



"Pete_UK" wrote:
Use SUBTOTAL(9,range) instead of SUM(range).


Hope this helps.


Pete


On Apr 21, 4:49 pm, max@SATX
wrote:
I have created a VBA function in an Excel 2003 worksheet takes a named range,
copies it, inserts it below the original range and does a re-naming of
specific text in a cell within that range.


I am now attempting to take the sum of a column of cells within the range
and add them to the previous sum of the original cells and total them in a
different named range below all of that. I cannot determine how to add the
two 'sub-totals' into one grand total each time a dynamically created range
is added.


Can someone please assist? Thanks.
--
max@SATX- Hide quoted text -


- Show quoted text -




Pete_UK

Totalling Dynamic Range Subtotals in Excel 2003
 
I can't answer you without further details of your "function" and what
"tasks" it performs.

Pete

On Apr 21, 9:28*pm, max@SATX
wrote:
Thanks, but this does not answer my dilemma. *I am probably not explaining it
very well. *When my function runs automatically, it creates a new task
between the first set of tasks and the grand totals. *I need the subtotal
function to automatically increase the grand total based upon the addition of
the subtotal from the new task. *The question (I think() is, how do I get
Excel to recognize the additional subtotal in the grand total column after
addition of the new task?
--
max@SATX



max@SATX

Totalling Dynamic Range Subtotals in Excel 2003
 
Here is the function in VBA:

Application.Goto Reference:="number"
Dim number As Integer
number = ActiveCell.Value + 1
ActiveCell.FormulaR1C1 = number

Application.Goto Reference:="Task1"
Selection.Copy

Application.Goto Reference:="LaborTotals"
Selection.Insert Shift:=xlDown
--
max@SATX


"Pete_UK" wrote:

I can't answer you without further details of your "function" and what
"tasks" it performs.

Pete

On Apr 21, 9:28 pm, max@SATX
wrote:
Thanks, but this does not answer my dilemma. I am probably not explaining it
very well. When my function runs automatically, it creates a new task
between the first set of tasks and the grand totals. I need the subtotal
function to automatically increase the grand total based upon the addition of
the subtotal from the new task. The question (I think() is, how do I get
Excel to recognize the additional subtotal in the grand total column after
addition of the new task?
--
max@SATX





All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com