View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie
 
Posts: n/a
Default help with formula please

Actually I think he was looking for something to be automatically filled in,
and for that you need an event macro,

or try to rely on "Extend lists and formats" which has so many twists and turns
that it usually doesn't work out. Though in this case it might.

I would use the following in B2 and extend it down as needed or use
an event macro to extend.
B2: =A2+OFFSET(B2,-1,0) instead of =A2+B1
the reason is so that you can easily insert or delete rows and
extend the formulas manually easily without having to modify formulas.

This is described on
http://www.mvps.org/dmcritchie/excel/insrtrow.htm
http://www.mvps.org/dmcritchie/excel/offset.htm

An Example of an Event macro to extend formula
Change Event (#change_event)
http://www.mvps.org/dmcritchie/excel...m#change_event


Biff's formula works
B2: =IF(A2="","",SUM(B$1,A$2:A2))
but it is not efficient because it adding up all of column A down to the
current row for each total rather than making use of a previous sum
in the row above. The check for A2="" allows you extend the formula
down past what you need without showing, but it will extend the used range
and require printing. Not efficient would not be noticed until you have
several thousand rows or a workbook full of such formulas.
http://groups.google.com/groups?as_u...2@TK2MSFTNGP10

At first I thought the original poster was seeing only galimi's reply because
ExcelForum does not thread but just attaches to the last reply in a newsgroup
thread (a minor problem compared to the more serious problems it causes), but there
were two separate replies from the original poster so he did refer to both replies,
I just think it was not understood that he would have to extend the formula from Biff down
and that an empty cell or null in column A would result in an empty column B but that
totals would still continue if more values are filled in column A later (say down two cells)..
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Biff" wrote in message ...
Hi!

My formula does exactly what you're asking for.

When you say:

that formula still isn't quite what I'm looking for.


I may not know what you're looking for but it does exactly what you've asked
for.

Based on your sample 2 doc the result in cell B3 should be 74 and that's
what my formula will give you.

We must be missing something in translation!

Biff

"catnohat" wrote in
message ...

Thanks, but that formula still isn't quite what I'm looking for. I have
included an attachment of an excel snippet with an explanation, perhaps
this will clearify my question. I want to thank you and everyone for
your help.:)


+-------------------------------------------------------------------+
|Filename: excel example 2.doc |
|Download: http://www.excelforum.com/attachment.php?postid=4446 |
+-------------------------------------------------------------------+

--
catnohat
------------------------------------------------------------------------
catnohat's Profile:
http://www.excelforum.com/member.php...o&userid=32377
View this thread: http://www.excelforum.com/showthread...hreadid=521394