Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nicolas
 
Posts: n/a
Default SUM of a variable range of fields

I have the following problem: I'm comparing daily statistics with prior
year but would like to do this on a month-to-date basis. This means
that I have to change the SUM range every-day for the current and prior
year in order to show the month-to-date total.
Can somebody tell me if there's a way to define the range in a way that
it will automatically increment as the days go by? The structure of my
table is somethink like this:

Days 1 2 3 4 5 6 ... Total to-date
Stats 5 8 10 3 26
Stats prior year 6 9 11 2 8 7 28

Many thanks for any help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default SUM of a variable range of fields

Assuming that Stats are A2:AE2 and Stats prior are A3:AE3, then sum of prior
stats could be

=SUM(A2:INDEX(A2:AE2,COUNT(A3:AE3)))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Nicolas" wrote in message
oups.com...
I have the following problem: I'm comparing daily statistics with prior
year but would like to do this on a month-to-date basis. This means
that I have to change the SUM range every-day for the current and prior
year in order to show the month-to-date total.
Can somebody tell me if there's a way to define the range in a way that
it will automatically increment as the days go by? The structure of my
table is somethink like this:

Days 1 2 3 4 5 6 ... Total to-date
Stats 5 8 10 3 26
Stats prior year 6 9 11 2 8 7 28

Many thanks for any help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nicolas
 
Posts: n/a
Default SUM of a variable range of fields

Perfect! Great! Many thanks! I wasn't familiar with the INDEX function.
You've just saved me lots of time.
Thanks.
Nicolas

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
Variable Input Range for Combo Box Defoes Right Boot Excel Worksheet Functions 2 July 20th 05 03:44 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Discussion (Misc queries) 1 March 9th 05 11:41 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM
using sumproduct in a range of text fields? Basil Excel Worksheet Functions 1 December 13th 04 12:19 PM
Counting a range of fields with an "X" Arge Excel Worksheet Functions 7 December 7th 04 03:23 AM


All times are GMT +1. The time now is 04:32 PM.

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

About Us

"It's about Microsoft Excel"