Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
coal_miner
 
Posts: n/a
Default Graph Help- 12 month graph, but only want months that have passed

I need help setting up a graph. It is a simple bar graph, that has the
months of the year on the x axis, and production in tons on the y axis. I
have a table setup for this Jan to Dec, but obviously only have data for Jan
through May. Is there a way I can set up the graph so it will only make the
graph Jan through May, but as I add more data, and months go by, it will
automatically add a new column for June, then July and so on and so on? I do
not want the months that have no data to be graphed with a value of zero, I
would rather them show up automatically when that month has data. Any help
would be appreciated. Thanks.
  #2   Report Post  
Andy Pope
 
Posts: n/a
Default

Hi,

Have a look at creating dynamic named ranges, here are 2 examples.
http://www.tushar-mehta.com/excel/ne...rts/index.html
http://peltiertech.com/Excel/Charts/Dynamics.html

Cheers
Andy

coal_miner wrote:
I need help setting up a graph. It is a simple bar graph, that has the
months of the year on the x axis, and production in tons on the y axis. I
have a table setup for this Jan to Dec, but obviously only have data for Jan
through May. Is there a way I can set up the graph so it will only make the
graph Jan through May, but as I add more data, and months go by, it will
automatically add a new column for June, then July and so on and so on? I do
not want the months that have no data to be graphed with a value of zero, I
would rather them show up automatically when that month has data. Any help
would be appreciated. Thanks.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
coal_miner
 
Posts: n/a
Default

Thank you this is helpful. One problem though is one my workbook I have the
months listed on the x-axis across the top, but do not have any data in the
individual cells within the columns. I need to leave the months of the
future on the workbook, so how can I leave them there, and it will not graph
them until there is data in the cells corresponding with the month? Is it
possible? Thanks

"Andy Pope" wrote:

Hi,

Have a look at creating dynamic named ranges, here are 2 examples.
http://www.tushar-mehta.com/excel/ne...rts/index.html
http://peltiertech.com/Excel/Charts/Dynamics.html

Cheers
Andy

coal_miner wrote:
I need help setting up a graph. It is a simple bar graph, that has the
months of the year on the x axis, and production in tons on the y axis. I
have a table setup for this Jan to Dec, but obviously only have data for Jan
through May. Is there a way I can set up the graph so it will only make the
graph Jan through May, but as I add more data, and months go by, it will
automatically add a new column for June, then July and so on and so on? I do
not want the months that have no data to be graphed with a value of zero, I
would rather them show up automatically when that month has data. Any help
would be appreciated. Thanks.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

  #4   Report Post  
Andy Pope
 
Posts: n/a
Default

Base the named range for the category labels on the cells with data
rather than the actual label cells. Did that make sense ???

For example, A1:A12 contains the month names and B1:B12 will contain
monthly data as and when. So usually the named range would be something
like,

ChtLabels: =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A$1:$A$12), 1)
ChtData: =OFFSET(Sheet1!$B$1,0,0,COUNT(Sheet1!$B$1:$B$12),1 )

But the ChtLabels would give you all 12 months straight away, so instead
modify that to use the same test as ChtData.

ChtLabels: =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$B$1:$B$12), 1)

or even better, once CHtData is defined,
ChtLabels: =OFFSET(ChtData,0,-1)

Cheers
Andy


coal_miner wrote:
Thank you this is helpful. One problem though is one my workbook I have the
months listed on the x-axis across the top, but do not have any data in the
individual cells within the columns. I need to leave the months of the
future on the workbook, so how can I leave them there, and it will not graph
them until there is data in the cells corresponding with the month? Is it
possible? Thanks

"Andy Pope" wrote:


Hi,

Have a look at creating dynamic named ranges, here are 2 examples.
http://www.tushar-mehta.com/excel/ne...rts/index.html
http://peltiertech.com/Excel/Charts/Dynamics.html

Cheers
Andy

coal_miner wrote:

I need help setting up a graph. It is a simple bar graph, that has the
months of the year on the x axis, and production in tons on the y axis. I
have a table setup for this Jan to Dec, but obviously only have data for Jan
through May. Is there a way I can set up the graph so it will only make the
graph Jan through May, but as I add more data, and months go by, it will
automatically add a new column for June, then July and so on and so on? I do
not want the months that have no data to be graphed with a value of zero, I
would rather them show up automatically when that month has data. Any help
would be appreciated. Thanks.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #5   Report Post  
coal_miner
 
Posts: n/a
Default

Thank you Andy, Im gonna give it a try.

"Andy Pope" wrote:

Base the named range for the category labels on the cells with data
rather than the actual label cells. Did that make sense ???

For example, A1:A12 contains the month names and B1:B12 will contain
monthly data as and when. So usually the named range would be something
like,

ChtLabels: =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A$1:$A$12), 1)
ChtData: =OFFSET(Sheet1!$B$1,0,0,COUNT(Sheet1!$B$1:$B$12),1 )

But the ChtLabels would give you all 12 months straight away, so instead
modify that to use the same test as ChtData.

ChtLabels: =OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$B$1:$B$12), 1)

or even better, once CHtData is defined,
ChtLabels: =OFFSET(ChtData,0,-1)

Cheers
Andy


coal_miner wrote:
Thank you this is helpful. One problem though is one my workbook I have the
months listed on the x-axis across the top, but do not have any data in the
individual cells within the columns. I need to leave the months of the
future on the workbook, so how can I leave them there, and it will not graph
them until there is data in the cells corresponding with the month? Is it
possible? Thanks

"Andy Pope" wrote:


Hi,

Have a look at creating dynamic named ranges, here are 2 examples.
http://www.tushar-mehta.com/excel/ne...rts/index.html
http://peltiertech.com/Excel/Charts/Dynamics.html

Cheers
Andy

coal_miner wrote:

I need help setting up a graph. It is a simple bar graph, that has the
months of the year on the x axis, and production in tons on the y axis. I
have a table setup for this Jan to Dec, but obviously only have data for Jan
through May. Is there a way I can set up the graph so it will only make the
graph Jan through May, but as I add more data, and months go by, it will
automatically add a new column for June, then July and so on and so on? I do
not want the months that have no data to be graphed with a value of zero, I
would rather them show up automatically when that month has data. Any help
would be appreciated. Thanks.

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

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
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
YTD Budget Sum if Actual Month has activities AGnes Excel Worksheet Functions 1 March 24th 05 09:25 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
Add one month to the previuos month heater Excel Discussion (Misc queries) 5 February 10th 05 12:33 AM
Month Year Date Format Jamie Excel Worksheet Functions 2 February 7th 05 06:43 PM


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