Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Help undertanding Subtotals

Hello all, another newbe question,
I am unsure how to add the information above the subtotal to the
subtotal row.
I have this subtotal line in my code:
Selection.subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(14),
_
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
I am totaling the amount in Column 14, but in columns 10-13,
i want to use the previous row's values and add those values to
the subtotal row. The rows change and are not always the same.

So, my row would be something like:
I: BLANK J: ABCD K:TBAVA L:THIS AND THAT M: SUPPORT N: 20
I: BLANK J: ABCD K:TBAVA L:THIS AND THAT M: SUPPORT N: 25
SubTotal N:45

So, instead of not seeing anthing in the subtotal besides subtotal and
the amount,
I want to copy the line above the subtotal paste it into the subtotal
line. So,
the subtotal line would read from the above example:
I: Subtotal J:ABCD K:TBAVA L:THIS AND THAT M:SUPPORT N:45

I have read some other posts concerning this issue and nothing i read
has
completed the solution. Any help would sure be appreciated.
Keri

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help undertanding Subtotals

subtotal adds the value for the column it is subtotalling on. For each
subtotal row, that can only be one column.

--
Regards,
Tom Ogilvy


"FurRelKT" wrote:

Hello all, another newbe question,
I am unsure how to add the information above the subtotal to the
subtotal row.
I have this subtotal line in my code:
Selection.subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(14),
_
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
I am totaling the amount in Column 14, but in columns 10-13,
i want to use the previous row's values and add those values to
the subtotal row. The rows change and are not always the same.

So, my row would be something like:
I: BLANK J: ABCD K:TBAVA L:THIS AND THAT M: SUPPORT N: 20
I: BLANK J: ABCD K:TBAVA L:THIS AND THAT M: SUPPORT N: 25
SubTotal N:45

So, instead of not seeing anthing in the subtotal besides subtotal and
the amount,
I want to copy the line above the subtotal paste it into the subtotal
line. So,
the subtotal line would read from the above example:
I: Subtotal J:ABCD K:TBAVA L:THIS AND THAT M:SUPPORT N:45

I have read some other posts concerning this issue and nothing i read
has
completed the solution. Any help would sure be appreciated.
Keri


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Help undertanding Subtotals

Correct Tom, here is a better Subject:

Need help with adding values to the Subtotal Row.
(values that are from the above row).

Does that explain my issue better?

Any place you can direct me to learn would be greatly appreciated.
I just want to learn the correct way.

Keri


Tom Ogilvy wrote:
subtotal adds the value for the column it is subtotalling on. For each
subtotal row, that can only be one column.

--
Regards,
Tom Ogilvy



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help undertanding Subtotals

Range("A21:C21").FillDown

would fill A21:C21 with the values in A20:C20

as an example. another example:

set rng = Range("A1:A50").specialcells(xlblanks)
for each cell in rng
cell.Resize(1,3).filldown
next

might be what you want.



--
Regards,
Tom Ogilvy


"FurRelKT" wrote:

Correct Tom, here is a better Subject:

Need help with adding values to the Subtotal Row.
(values that are from the above row).

Does that explain my issue better?

Any place you can direct me to learn would be greatly appreciated.
I just want to learn the correct way.

Keri


Tom Ogilvy wrote:
subtotal adds the value for the column it is subtotalling on. For each
subtotal row, that can only be one column.

--
Regards,
Tom Ogilvy




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) AndyCotgreave Excel Discussion (Misc queries) 3 October 24th 07 11:32 AM
Help undertanding Subtotals FurRelKT Excel Programming 2 July 31st 06 08:09 PM
Subtotals: Nested subtotals below higher subtotal RobN Excel Discussion (Misc queries) 1 July 20th 06 09:04 PM
How do I copy an outline w/ subtotals & paste just the subtotals av Excel Discussion (Misc queries) 1 June 20th 05 11:35 PM
Problem with nested subtotals, placing secondary subtotals BELOW . Dawn Cameron Excel Discussion (Misc queries) 1 June 3rd 05 10:13 PM


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"