#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default cell totals

I have cell A15 that totals cells A1,A4,and A7,and the same with B15,C15
and so on. but there are times that I want to total different cells across ,
like A2,A3, and A4 is there a way I can get change the combination of cells
I want to total without manually changing the cells in the total formula.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default cell totals

On Aug 21, 2:41*pm, steve wrote:
*I have cell A15 *that totals cells A1,A4,and A7,and the same with B15,C15
and so on. *but there are times that I want to total different cells across ,
like A2,A3, and A4 is there a way I can get change the *combination of cells
I want to total without manually changing the cells in the total formula.


Sub SumChooser()
Dim SmRng As Range
Dim DestRng As Range

Set SmRng = Application.InputBox("Select the cells you want to Sum
(Hold CTRL for multiple cells)", Type:=8)
Set DestRng = Application.InputBox("Where do you want the results?",
Type:=8)
DestRng.Formula = Application.Sum(SmRng)

End Sub



You'll be able to select individual cells and the destination for your
SUM results.


Steven
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default cell totals

I put together this program for someone that has very little computer
konwledge, and they are scare that they will mess things up going in changing
the formula.
actual formula SUM(C7,F7,J7,N7,R7,S7)*3-72*0.8, there are times when
different cells are wanted like A7,E7,K7 ect.

there are 150 lines with this sum cell

" wrote:

On Aug 21, 2:41 pm, steve wrote:
I have cell A15 that totals cells A1,A4,and A7,and the same with B15,C15
and so on. but there are times that I want to total different cells across ,
like A2,A3, and A4 is there a way I can get change the combination of cells
I want to total without manually changing the cells in the total formula.


Sub SumChooser()
Dim SmRng As Range
Dim DestRng As Range

Set SmRng = Application.InputBox("Select the cells you want to Sum
(Hold CTRL for multiple cells)", Type:=8)
Set DestRng = Application.InputBox("Where do you want the results?",
Type:=8)
DestRng.Formula = Application.Sum(SmRng)

End Sub



You'll be able to select individual cells and the destination for your
SUM results.


Steven

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default cell totals

It's tough to give an answer without some atmospheric extrapolation.

Under what conditions do you want to select the different groupings of
cells? We'd need to know that to answer your question.
--
HTH,
Barb Reinhardt



"steve" wrote:

I have cell A15 that totals cells A1,A4,and A7,and the same with B15,C15
and so on. but there are times that I want to total different cells across ,
like A2,A3, and A4 is there a way I can get change the combination of cells
I want to total without manually changing the cells in the total formula.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default cell totals

I put together this program for someone that has very little computer
konwledge, and they are scare that they will mess things up going in changing
the formula.
actual formula SUM(C7,F7,J7,N7,R7,S7)*3-72*0.8, there are times when
different cells are wanted like A7,E7,K7 ect.

"Barb Reinhardt" wrote:

It's tough to give an answer without some atmospheric extrapolation.

Under what conditions do you want to select the different groupings of
cells? We'd need to know that to answer your question.
--
HTH,
Barb Reinhardt



"steve" wrote:

I have cell A15 that totals cells A1,A4,and A7,and the same with B15,C15
and so on. but there are times that I want to total different cells across ,
like A2,A3, and A4 is there a way I can get change the combination of cells
I want to total without manually changing the cells in the total formula.



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
Totals in one cell tl Excel Discussion (Misc queries) 6 May 11th 10 06:21 PM
Two different totals in one cell something68 Excel Discussion (Misc queries) 2 May 5th 10 03:57 PM
getting totals mutiply cell by another cell then adding all togeth texansgal Excel Worksheet Functions 3 June 2nd 09 02:36 AM
cell totals Lynn Excel Discussion (Misc queries) 4 January 13th 09 04:21 PM
Pivot Totals: Group totals different from Grand totals PsyberFox Excel Discussion (Misc queries) 1 February 13th 08 06:16 PM


All times are GMT +1. The time now is 11:00 AM.

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

About Us

"It's about Microsoft Excel"