Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Man Man is offline
external usenet poster
 
Posts: 8
Default Sum of continous cell

I need to sum budget from month 1 to month "N", where "N" is a variable that
changes each month, but I don't want to change the sum formula, only the
variable that represents the month.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Sum of continous cell

Assuming your variable that changes each month is in cell B1, and assuming
the budgets from month to month are variable named such as Month1, you could
use:

=SUM(INDIRECT("Month1"):INDIRECT("Month"&B1))

Hope that helps.
--
John C


"Man" wrote:

I need to sum budget from month 1 to month "N", where "N" is a variable that
changes each month, but I don't want to change the sum formula, only the
variable that represents the month.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 209
Default Sum of continous cell

Assume:
Col A has your budget categories such as Travel, Entertainment, etc
Cols B thru M are 'Jan' thru 'Dec'
- The months, 'Jan' thru 'Dec' labels are in row 2
Col N has formula for totals for 'Jan' thru 'Dec'
- The data starts in row 3
Cell A1 has the 'current' month that you want to sum to.
ie: In Jan, Cell A1 = 1, in Feb, Cell A1 = 2, etc
The formula in cell N3 would be...
=SUM(B3:OFFSET(B3,0,$A$1-1))

Copy this formula down the worksheet.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Man" wrote:

I need to sum budget from month 1 to month "N", where "N" is a variable that
changes each month, but I don't want to change the sum formula, only the
variable that represents the month.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum of continous cell

One way:

=SUM(A1:INDEX(A1:L1,n))

Where n = your variable. N can be a cell reference or it can be calculated:

A2 = 7

=SUM(A1:INDEX(A1:L1,A1))

=SUM(A1:INDEX(A1:L1,MONTH(NOW())))

Both of the above formulas translate to:

=SUM(A1:G1)

--
Biff
Microsoft Excel MVP


"Man" wrote in message
...
I need to sum budget from month 1 to month "N", where "N" is a variable
that
changes each month, but I don't want to change the sum formula, only the
variable that represents the month.



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
Basic template with continous numbers changing only Sar Excel Worksheet Functions 1 February 9th 08 11:29 AM
Print row labels that are continous Luke Excel Discussion (Misc queries) 1 November 23rd 07 01:37 PM
Continous updating of linked spreadsheet tony Links and Linking in Excel 1 September 4th 06 06:09 PM
Overwrite tab 1 (1 save per overwite), continous update in tab 2. Excel novice Excel Discussion (Misc queries) 1 August 25th 06 04:40 PM
countif with non-continous ranges Debbie Excel Worksheet Functions 7 May 10th 06 09:00 PM


All times are GMT +1. The time now is 05:37 PM.

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"