MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Apr 25th, 2002, 05:14 AM   #1
gbarclay2001
New Member
 
Join Date: Mar 2002
Location: London
Posts: 46
Default

I have a chart that reports on all products that expire over the next 12 months. Several years worth of data is kept in one large table and the chart pulls the data from this.

This month it shows from April 2002- April 2003, which is fine. The problem is next month the chart's source must move to the left by a cell to pick up March 2002 - March 2003.

Is there a way to automatically do this without having to right click on the chart and manually chamge the source data.

Thanks for any ideas,

Greg
gbarclay2001 is offline   Reply With Quote
Old Apr 25th, 2002, 05:15 AM   #2
gbarclay2001
New Member
 
Join Date: Mar 2002
Location: London
Posts: 46
Default

May 2002 - May 2003 even
gbarclay2001 is offline   Reply With Quote
Old Apr 25th, 2002, 05:37 AM   #3
Iain Lewis
Board Regular
 
Join Date: Apr 2002
Location: Midlands, UK
Posts: 217
Default

Don't know how feasible this is given that it may be a large data source, but why not have a duplicate of the source data in another sheet ( linked to the original data so that it updates as & when ). Set the chart range for the whole the duplicate data eg Jan 2002 to Dec 2003 and then just hide the columns / rows which aren't required. Then hide the sheet containing the duplicate data.
Iain Lewis is offline   Reply With Quote
Old Apr 25th, 2002, 05:37 AM   #4
andy-s
Board Regular
 
Join Date: Mar 2002
Posts: 51
Default

Hi,

what you probably need is a dynamic chart that always shows the last 12 values. You can see how this can be done at

http://www.erlandsendata.no/english/...ads/charts.htm

Look for "Dynamic Chart Example".

andy-s
andy-s is offline   Reply With Quote
Old Apr 25th, 2002, 05:41 AM   #5
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

If the headings in your source table are dates, you could place a simple set of instructions in an event code block to set the source range dynamically.
Is this the case in your case?
Tom
Tom Schreiner is offline   Reply With Quote
Old Apr 25th, 2002, 05:49 AM   #6
gbarclay2001
New Member
 
Join Date: Mar 2002
Location: London
Posts: 46
Default

Hi TsTom,

The headings are months of the year.

I could probably pull the data from a pivot table to, so If I can set the criteria of a pivot table depending on the month the table would stay the same size. Is that possible?
gbarclay2001 is offline   Reply With Quote
Old Apr 25th, 2002, 05:59 AM   #7
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

Greg,
I don't know the first thing about pivot tables.
I am a VB programmer who is learning Excel.
There is very little you cannot do with Excel via VB or VBA but there are probably easier solutions with lookups and other available functions.
I do not know the exact setup of your table, but I think I understand what you are after.
You need a square chart source Range to move over one cell/column in your table from 04/01 to 04/02 then to 05/01 to 05/02?
You may want to hang out for a better solution. If not give me the references of your table.
Tom
Tom Schreiner is offline   Reply With Quote
Old Apr 25th, 2002, 06:19 AM   #8
gbarclay2001
New Member
 
Join Date: Mar 2002
Location: London
Posts: 46
Default

Tom,

Yeah that's right. My table of source data runs from B3-Y7. This month the chart pulls the range E3-Q7 (April 02-April 03). So next month I need the source data of the graphs to change automatically to F3-R7.

Example of chart data.....

E3: April 02
E4: 4334
E5: 535
E6: 243
E7: 6785

So twelve of the above are in the graph (not quite sure what use my excellent 'example of chart data' is actually but you can have it anyway)

Greg
gbarclay2001 is offline   Reply With Quote
Old Apr 25th, 2002, 06:25 AM   #9
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

Ok
What is the criteria for automating the new source range?
Today's date?
For example:
If today were May 01
automatically select the new source?
Does your table just keep moving to the right every month? Indefinitely?
Also, what is the name of the worksheet holding the source range?
Will also need your chart name.

Thanks,
Tom


[ This Message was edited by: TsTom on 2002-04-25 05:32 ]
Tom Schreiner is offline   Reply With Quote
Old Apr 25th, 2002, 06:36 AM   #10
gbarclay2001
New Member
 
Join Date: Mar 2002
Location: London
Posts: 46
Default

Exactly as you say. As soon as May comes along it needs to shift to the right. And yes it will move right indefinitely. The graph and source are both on the same sheet – Pipeline.
gbarclay2001 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 04:21 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes