Hi Andrew,
For an indication of what you actually see on the statusbar see
http://www.mvps.org/dmcritchie/excel/statusbar.htm
The SUM toolbar icon will not sum a SUM, and has several idiosyncrasies
to compensate for various implementation. The area to be summed
must be contiguous.
If you just want a total below a column of numbers, and want to insert
rows later suggest something like the following in you workbook and
no macro would be needed.. Example below, for more information see
http://www.mvps.org/dmcritchie/excel/offset.htm
which also includes an Event macro to simulate use of the SUM toolbar
icon.bit with OFFSET as shown below.so you won't have to update
the formula manually.. .
b2: 3.00
b3: 5.00
b4: 6.70
b5: =SUM(B2:OFFSET(B5,-1,0))
so if you insert a row after b4 and place a number in it you would then have
b5: 3.33
b6: =SUM(B2:OFFSET(B6,-1,0))
You can use the fill handle to replicate the formula across
for additional columns.
http://www.mvps.org/dmcritchie/excel/fillhand.htm
For a macro similar to what you ask for you would use code
similar to the event macro in offset.htm and then force the
user to make another selection while the macro is running.
1) make a selection
2) run a macro that might use
sumx = "=SUM(" & selection.address & ")"
but would be better to use OFFSET in the formula.
3) ask for you to select the cell for the sum
4) plop formula into cell
selection.formula = sumx
Macro not supplied, because I think there are better alternatives already
mentioned. i.e. offset.htm page
If the selection is a bunch of discontiguous cells and you want a formula
and not a value, you should be aware that there is a specification limit on
the number of characters in a formula.
Length of formula contents: 1,024 characters