cell totals

S

steve

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.
 
S

sbitaxi

 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
 
B

Barb Reinhardt

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.
 
S

steve

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.
 
S

steve

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top