Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Sum of a range that varies

Good day,

I am making the sum of a range that varies in length. For example

Cell(1, B) = SUM(A1:A10)

The cells A1 to A10 are a database that is updated daily, and the number of
rows varies also daily. So one day, the sum could be A1:A7, and the next day
it is A1:A12. Also, the range sometimes needs to start at A1, sometimes A3
or A5, it is never the same.

I would need a way to have the last value of my range as a variable instead
of a fix value.

The final formula should ideally fit in only one cell. I am thinking of
using the count() or the Row() function within my SUM formula but nothing
works.

--
Thanks
Sebastien
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Sum of a range that varies

Hi Sebastien

Since you have a changing start and changing end to your range, you would
need a method of telling the formula where both of these values are.
With your formula in B1, set the start row in C1 and the end row in D1
=SUM(INDEX(A:A,C1):INDEX(A:A,D1))

With 5 in C1 and 17 in D1 it would be the same as
=SUM(A5:A17)

--
Regards
Roger Govier

"Sebastien" wrote in message
...
Good day,

I am making the sum of a range that varies in length. For example

Cell(1, B) = SUM(A1:A10)

The cells A1 to A10 are a database that is updated daily, and the number
of
rows varies also daily. So one day, the sum could be A1:A7, and the next
day
it is A1:A12. Also, the range sometimes needs to start at A1, sometimes
A3
or A5, it is never the same.

I would need a way to have the last value of my range as a variable
instead
of a fix value.

The final formula should ideally fit in only one cell. I am thinking of
using the count() or the Row() function within my SUM formula but nothing
works.

--
Thanks
Sebastien


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight same part numbers with high price varies among themselv CYNTHIA Excel Discussion (Misc queries) 3 November 5th 07 09:24 PM
Font displayed varies from selection Geema Excel Discussion (Misc queries) 3 February 2nd 07 07:55 PM
Find character when the length varies Rookie_User Excel Discussion (Misc queries) 3 April 12th 06 07:17 PM
PPMT Function with varies interest rate ExcelMonkey Excel Worksheet Functions 1 April 10th 06 06:54 PM
Border thickness varies when I paste Excel cells into Word. Sam Excel Discussion (Misc queries) 0 August 31st 05 05:03 PM


All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"