Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
substring
 
Posts: n/a
Default How to compare current year to prior year in bar chart?

I like to create a bar chart to compare, e.g. the sales figures of product
abc, for the current year (from Jan to Dec) against the numbers for prior
year (from Jan to Dec). Basically with 2 bars (current and prior) side by
side for each month. The data can be on the same worksheet or in separate
worksheet for each year.

I am having a hard time to make it work. How can I define the data range
such that Excel will know it should be a comparison?

Any help will be very much appreciated.

  #2   Report Post  
Barb R.
 
Posts: n/a
Default

Put your data in this form:

Month 2003 2004 2005
Jan
Feb
Mar
Apr
May
....


"substring" wrote:

I like to create a bar chart to compare, e.g. the sales figures of product
abc, for the current year (from Jan to Dec) against the numbers for prior
year (from Jan to Dec). Basically with 2 bars (current and prior) side by
side for each month. The data can be on the same worksheet or in separate
worksheet for each year.

I am having a hard time to make it work. How can I define the data range
such that Excel will know it should be a comparison?

Any help will be very much appreciated.

  #3   Report Post  
John Mansfield
 
Posts: n/a
Default

You can set your data up like this . . assuming the range A1:C13.

Curr Year Prior Year
Jan 6 6
Feb 4 5
Mar 5 7
Apr 6 8
May 7 7
Jun 5 4
Jul 3 5
Aug 4 6
Sep 5 5
Oct 4 3
Nov 3 4
Dec 2 5

Put your curser in cell A1. Go to the Standard Toolbar and Select the Chart
Wizard. In Step 2 of the Chart Wizard (the Data Range tab), make sure that
you have selected "Series in: Columns". To show the actual years in your
legend, change "Curr Year" to 2005 and "Prior Year" to 2004.

--
Regards,
John Mansfield
http://www.pdbook.com


"substring" wrote:

I like to create a bar chart to compare, e.g. the sales figures of product
abc, for the current year (from Jan to Dec) against the numbers for prior
year (from Jan to Dec). Basically with 2 bars (current and prior) side by
side for each month. The data can be on the same worksheet or in separate
worksheet for each year.

I am having a hard time to make it work. How can I define the data range
such that Excel will know it should be a comparison?

Any help will be very much appreciated.

  #4   Report Post  
simon
 
Posts: n/a
Default

Thank you Barb and John for your help. I have figured out how to do that. I
think it might be a bug in Excel or something. I cannot change the data range
of an existing chart from single year to multiple years (current and prior)
without messing up the chart. But if I delete the chart and create a new one.
It works beautifully.

Now, I run into another problem. I have another chart that uses the Stacked
Bars. Bascially, I have 3 items for each month of the current year and they
are stacked on top of each other. Now, if I add the prior year data, they
simply stack on top of the current year instead of showing side-by-side.

These are the sample of my data:
2005 Jan Feb Mar...
ItemA 10 20 15
ItemB 20 10 5
ItemC 15 10 20

2004 Jan Feb Mar...
ItemA 20 15 20
ItemB 10 5 10
ItemC 20 15 10

Now, how can I stack up Item A, B, and C of 2005 and Item A, B, and C of
2004 side-by-side for each month?

Thanks.



"John Mansfield" wrote:

You can set your data up like this . . assuming the range A1:C13.

Curr Year Prior Year
Jan 6 6
Feb 4 5
Mar 5 7
Apr 6 8
May 7 7
Jun 5 4
Jul 3 5
Aug 4 6
Sep 5 5
Oct 4 3
Nov 3 4
Dec 2 5

Put your curser in cell A1. Go to the Standard Toolbar and Select the Chart
Wizard. In Step 2 of the Chart Wizard (the Data Range tab), make sure that
you have selected "Series in: Columns". To show the actual years in your
legend, change "Curr Year" to 2005 and "Prior Year" to 2004.

--
Regards,
John Mansfield
http://www.pdbook.com


"substring" wrote:

I like to create a bar chart to compare, e.g. the sales figures of product
abc, for the current year (from Jan to Dec) against the numbers for prior
year (from Jan to Dec). Basically with 2 bars (current and prior) side by
side for each month. The data can be on the same worksheet or in separate
worksheet for each year.

I am having a hard time to make it work. How can I define the data range
such that Excel will know it should be a comparison?

Any help will be very much appreciated.

  #5   Report Post  
simon
 
Posts: n/a
Default

Well, problem solved. It wasn't easy, but I found a workaround that requires
some hacks.

If anyone from the Microsoft development team is watching this thread,
please, please, please add a chart type to handle stacked bars that compare
current year with prior year.

Thanks.


"simon" wrote:

Thank you Barb and John for your help. I have figured out how to do that. I
think it might be a bug in Excel or something. I cannot change the data range
of an existing chart from single year to multiple years (current and prior)
without messing up the chart. But if I delete the chart and create a new one.
It works beautifully.

Now, I run into another problem. I have another chart that uses the Stacked
Bars. Bascially, I have 3 items for each month of the current year and they
are stacked on top of each other. Now, if I add the prior year data, they
simply stack on top of the current year instead of showing side-by-side.

These are the sample of my data:
2005 Jan Feb Mar...
ItemA 10 20 15
ItemB 20 10 5
ItemC 15 10 20

2004 Jan Feb Mar...
ItemA 20 15 20
ItemB 10 5 10
ItemC 20 15 10

Now, how can I stack up Item A, B, and C of 2005 and Item A, B, and C of
2004 side-by-side for each month?

Thanks.



"John Mansfield" wrote:

You can set your data up like this . . assuming the range A1:C13.

Curr Year Prior Year
Jan 6 6
Feb 4 5
Mar 5 7
Apr 6 8
May 7 7
Jun 5 4
Jul 3 5
Aug 4 6
Sep 5 5
Oct 4 3
Nov 3 4
Dec 2 5

Put your curser in cell A1. Go to the Standard Toolbar and Select the Chart
Wizard. In Step 2 of the Chart Wizard (the Data Range tab), make sure that
you have selected "Series in: Columns". To show the actual years in your
legend, change "Curr Year" to 2005 and "Prior Year" to 2004.

--
Regards,
John Mansfield
http://www.pdbook.com


"substring" wrote:

I like to create a bar chart to compare, e.g. the sales figures of product
abc, for the current year (from Jan to Dec) against the numbers for prior
year (from Jan to Dec). Basically with 2 bars (current and prior) side by
side for each month. The data can be on the same worksheet or in separate
worksheet for each year.

I am having a hard time to make it work. How can I define the data range
such that Excel will know it should be a comparison?

Any help will be very much 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
Extracting data from the current date Cali00 Excel Worksheet Functions 2 April 14th 05 05:49 AM
extract date from the most current date Cali00 Excel Discussion (Misc queries) 1 April 13th 05 02:05 PM
HELP - need to returns the current number of past month this year and ... elz64 Excel Worksheet Functions 6 April 6th 05 01:37 PM
Is there a way to compare 2 spreadsheets with Excel? Dave Peterson Excel Discussion (Misc queries) 3 March 29th 05 12:36 AM
Weeknum Year by Year Compare RJB Charts and Charting in Excel 4 December 29th 04 10:33 PM


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