inserting sum but not as formula

  • Thread starter Thread starter p4038n
  • Start date Start date
P

p4038n

I could have sworn someone showed me how to do this:
If I want to randomly select a few cells to be added, I
highlight the 3 or 4 cells and the sum shows in the bottom
of the screen on the right as sum. I want to insert that
total as numbers, not a formula, into the cell beneath
those cells without having to manually type the total that
is appearing at the bottom of the screen and as I say
without it being a formula of any kind.

Can this be done?

Thank you!
 
Hi
one way:
- put the following code in one of your workbook modules
- Select your cells and invoke this macro (you may assign a button to
this macro)

----
Sub insert_sum()
Dim rng As Range
Dim ret_value As Double
Set rng = Selection
ret_value = Application.WorksheetFunction.sum(rng)
Cells(rng.row, rng.Column + 1).Value = ret_value
End Sub
 
It can easily be done to put a formula in automatically, or use VBA to put
in a value, but no way that I know to automatically load a value.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I could have sworn someone showed me how to do this:
If I want to randomly select a few cells to be added, I
highlight the 3 or 4 cells and the sum shows in the bottom
of the screen on the right as sum. I want to insert that
total as numbers, not a formula, into the cell beneath
those cells without having to manually type the total that
is appearing at the bottom of the screen and as I say
without it being a formula of any kind.

Can this be done?

Thank you!



i think this depends on the version of excel you are using - if you
have 2002 then you should have a 'calculate now' on your short cut
menu.

if not

autosum - then F2 to edit cell and then F9 to make it a number not a
formula


http://www.buffyslay.co.uk
(e-mail address removed)
remove clothes for email
 
Back
Top