Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Selecting different cells each month

Hi MS Office Help,

I would like to know how to choose a selection of cells based on what month
it is in the real world.

For instance, if the month was january, excel would allow me to select cells
A1-F1, which I could then use as a data source for a chart. If the month
became march or april, excel would allow me to select cells C1-H1, D1-I1
respectively, and so on. This will allow me to vary my chart automatically as
the month changes, which will be useful when I need to make monthly statements.

Help is greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 135
Default Selecting different cells each month

Solomon -

One way is to use a set of unused cells to house the data for the chart.
For example, if you want to always chart 6 values, then you can set up a
worksheet with the data in cells AA2 to AF2, and the headings in cells AA1 to
AF1. Then this is what you put in cell AA2 (the first data cell):
=INDIRECT("R1C"&MONTH(NOW()),FALSE)
Explanation: This cell looks at today's date Now() and gets the month
number Month and appends that to a relative address. For January this
would be R1C1, for February this would be R1C2, etc. Then the INDIRECT will
put the value of the cell into the current cell (AA2).

So, you can set up the 5 cells in a similar manner. If you need column
titles to change so you can use them on the chart, then you can do the same
for cells AA1 to AF1.

Now, point your chart to use these cells, and as the months change, so will
these values, and your chart.

--
Daryl S


"Solomon" wrote:

Hi MS Office Help,

I would like to know how to choose a selection of cells based on what month
it is in the real world.

For instance, if the month was january, excel would allow me to select cells
A1-F1, which I could then use as a data source for a chart. If the month
became march or april, excel would allow me to select cells C1-H1, D1-I1
respectively, and so on. This will allow me to vary my chart automatically as
the month changes, which will be useful when I need to make monthly statements.

Help is greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Selecting different cells each month

Thank you, this is very useful. I can clearly see where to go from here.

"Daryl S" wrote:

Solomon -

One way is to use a set of unused cells to house the data for the chart.
For example, if you want to always chart 6 values, then you can set up a
worksheet with the data in cells AA2 to AF2, and the headings in cells AA1 to
AF1. Then this is what you put in cell AA2 (the first data cell):
=INDIRECT("R1C"&MONTH(NOW()),FALSE)
Explanation: This cell looks at today's date Now() and gets the month
number Month and appends that to a relative address. For January this
would be R1C1, for February this would be R1C2, etc. Then the INDIRECT will
put the value of the cell into the current cell (AA2).

So, you can set up the 5 cells in a similar manner. If you need column
titles to change so you can use them on the chart, then you can do the same
for cells AA1 to AF1.

Now, point your chart to use these cells, and as the months change, so will
these values, and your chart.

--
Daryl S


"Solomon" wrote:

Hi MS Office Help,

I would like to know how to choose a selection of cells based on what month
it is in the real world.

For instance, if the month was january, excel would allow me to select cells
A1-F1, which I could then use as a data source for a chart. If the month
became march or april, excel would allow me to select cells C1-H1, D1-I1
respectively, and so on. This will allow me to vary my chart automatically as
the month changes, which will be useful when I need to make monthly statements.

Help is greatly appreciated.

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
How to change shade of cells when selecting multiple cells abrummet Excel Discussion (Misc queries) 3 September 6th 07 11:42 AM
Selecting the current month using a macro on a pivot table Newbee Excel Discussion (Misc queries) 3 November 12th 06 07:10 PM
By selecting cells adjacent to cells tally sheet tom Excel Worksheet Functions 2 September 20th 06 07:09 PM
How do I set up 12-month rolling month cells in excel? jbh Excel Discussion (Misc queries) 2 November 30th 05 08:12 PM
ytd sum by selecting month Greg Excel Worksheet Functions 1 June 20th 05 10:17 PM


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