View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default How can I add down a list a specified number of cells?

That's good to hear, and thanks for the feedback. In my formula, if F1
contained 10, then what it is doing is:

SUM(INDIRECT("A2:A"&F1+1)), which becomes:

=SUM(INDIRECT("A2:A"&11)), or:

=SUM(INDIRECT("A2:A11")), or:

=SUM(A2:A11)

i.e. the reference to the last cell in the range is created by adding
1 onto the number in F1. This is fine if your numbers start in A2, but
if they started in A5, say, and you wanted 10 of them, then you would
want the range to be A5:A14, in which case you would have to add 4
onto F1 to get the last cell.

Hope this explains a bit further.

Pete

On Nov 30, 1:40 pm, porbeagle
wrote:
Thanks!!!!

Both these formula's work (although I am yet to work out how). Although due
to my column text headers I have added +4 to the end of each formula (where
you had +1 Pete and after your B1 Pete) to start the count from a few rows
down. Thanks guys you have turned a whole afternoon's work into a few hours,
at the means alot on a Friday!!!



"Ron Coderre" wrote:
Try something like this:


B1: (number of cells to add.....eg 10)
A1: =SUM(A2:INDEX(A:A,B1))


In that example, the formula in A1 sums cells A2:A10


Is that something you can work with?
Post back if you have more questions.
--------------------------


Regards,


Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"porbeagle" wrote in message
...
I have a huge number of lists that I am calculating. I have a vertical list
of numbers
each vertical cell represents a week. I am trying to add up a varing
number
of week forward to madel stock controls. Currently I am adding up each
individual cell for the number of week that i need (ie 4 weeks is
=sum(a2+a3+a4+a5). This is very clumsy and time consuming. Is there a way
to
write a formula that adds up a specified number of cells forward. i.e add
ten
cells down the list and return total?- Hide quoted text -


- Show quoted text -