Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Auto Sum a Range of Cells based on the date

Hello,

I have a table with each column titled by the month, and in row 1 I have a
range of data. I would like to have a formula that automatically sums up the
range up to the current month without having to enter in a new formula any
month. Is this possible? I imagine it would require the TODAY() function
but after that I am lost.

Example:

Nov-06 Dec-06 Jan-07 Feb-07 Mar-07 Apr-07 May-07 Jun-07
1.0 2.0 2.0 2.0 1.0 1.0 1.0 2.0

Today I would want to add up the Nov-Jan colums to get (5), but next month
when I open the same spreadsheet I would like that same formula to add up the
Nov-Feb columns to get (7)
Thanks!
Joe


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Auto Sum a Range of Cells based on the date

There are a few approaches

Using your posted data in A1:H2
and
If the first row of data contains actual dates that are the 1st of the month

Try this:
A3: =SUM(A2:INDEX(A2:H2,1,MATCH(TODAY(),A1:H1,1)))

Is that something you can work with?

Or.... if your data has a different structure, please share it.
***********
Regards,
Ron

XL2002, WinXP


"jcpotwor" wrote:

Hello,

I have a table with each column titled by the month, and in row 1 I have a
range of data. I would like to have a formula that automatically sums up the
range up to the current month without having to enter in a new formula any
month. Is this possible? I imagine it would require the TODAY() function
but after that I am lost.

Example:

Nov-06 Dec-06 Jan-07 Feb-07 Mar-07 Apr-07 May-07 Jun-07
1.0 2.0 2.0 2.0 1.0 1.0 1.0 2.0

Today I would want to add up the Nov-Jan colums to get (5), but next month
when I open the same spreadsheet I would like that same formula to add up the
Nov-Feb columns to get (7)
Thanks!
Joe


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Auto Sum a Range of Cells based on the date

Hi Ron,

It works perfectly - THANK YOU SO MUCH !!!!!

"Ron Coderre" wrote:

There are a few approaches

Using your posted data in A1:H2
and
If the first row of data contains actual dates that are the 1st of the month

Try this:
A3: =SUM(A2:INDEX(A2:H2,1,MATCH(TODAY(),A1:H1,1)))

Is that something you can work with?

Or.... if your data has a different structure, please share it.
***********
Regards,
Ron

XL2002, WinXP


"jcpotwor" wrote:

Hello,

I have a table with each column titled by the month, and in row 1 I have a
range of data. I would like to have a formula that automatically sums up the
range up to the current month without having to enter in a new formula any
month. Is this possible? I imagine it would require the TODAY() function
but after that I am lost.

Example:

Nov-06 Dec-06 Jan-07 Feb-07 Mar-07 Apr-07 May-07 Jun-07
1.0 2.0 2.0 2.0 1.0 1.0 1.0 2.0

Today I would want to add up the Nov-Jan colums to get (5), but next month
when I open the same spreadsheet I would like that same formula to add up the
Nov-Feb columns to get (7)
Thanks!
Joe


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Auto Sum a Range of Cells based on the date

Hi,

Another way:

=SUMPRODUCT(--(A1:H1<=TODAY()),A2:H2)

Cheers!
Jean-Guy

"jcpotwor" wrote:

Hello,

I have a table with each column titled by the month, and in row 1 I have a
range of data. I would like to have a formula that automatically sums up the
range up to the current month without having to enter in a new formula any
month. Is this possible? I imagine it would require the TODAY() function
but after that I am lost.

Example:

Nov-06 Dec-06 Jan-07 Feb-07 Mar-07 Apr-07 May-07 Jun-07
1.0 2.0 2.0 2.0 1.0 1.0 1.0 2.0

Today I would want to add up the Nov-Jan colums to get (5), but next month
when I open the same spreadsheet I would like that same formula to add up the
Nov-Feb columns to get (7)
Thanks!
Joe


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
Dynamic Ranges using non-contiguous cells and dependent on a cell value Carlo Paoloni Excel Worksheet Functions 2 November 29th 06 07:29 PM
Return info based on Date Range kermitforney Excel Worksheet Functions 3 July 11th 06 07:59 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM


All times are GMT +1. The time now is 11:13 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"