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
|