View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Sum in first blank cell and a few more things...

A non-macro solution:
Have you considered the SUBTOTAL function? The format is
=SUBTOTAL(9,A1:A10) (Note: the "9," is important.)
This provides the subtotal of the range you specify- and here's the
tricky bit- while ***ignoring*** cells in that range that also use the
SUBTOTAL formula. So if your column looked like (starting in A1, for
example)
14
25
36
subtotal formula
blank
15
26
37
48
subtotal formula
blank
=SUBTOTAL(9,A1:A11) would return 201 because it disregards the formulas
in cells A4 and A10.

To make this a quicker process, with the cell pointer in A4 press the
Sigma menu button, which automatically enters a SUM formula, and repeat
for other subtotal cells. Then search for the text string SUM( and
replace it with SUBTOTAL(9,

It all comes down to: did you request a macro in your original post
because you have to do this over a huge range of cells all day every
day, or because you thought there was no other way?