Dynamic/Linked Chart

Rammy

New Member
Joined
Feb 17, 2011
Messages
11
Hi All,

I want to create a single chart that changes depending on a word that is selected. For instance, if I had:

John
Bob
George

I would like to have a drop down menu with John, Bob, and George's name.
If I were to select on John, I would have a particular graph associated with John's information to appear. Similarly, if Bob were clicked his graph would appear.

Additionally, the number of names could change could change (i.e. 4, 5,... or more names).

Is this feasible? If it is, could someone help me with a template?

Thanks!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
There are two ways to do this that come immediately to mind, and probably lots of other ways as well.

Method A: The chart looks at a static range of cells, whose values are dynamic. Create a range of cells somewhere separate from the source data. This area will hold LOOKUP or INDEX/MATCH formulas to go into the source table and pull out the data for the employee you've selected in the dropdown, and your chart will point at this fixed range of cells. Make your formulas look at the current and future range of cells to accommodate changes. See the yellow cells in the example below, where cell I13 is a Data Validation dropdown.

Method B: The chart looks at a dynamic range of cells. Create named ranges for the X and Y values. Define the named ranges using OFFSET formulas which look through the source table for the data associated with the employee you've selected. Make the OFFSET formulas looks beyond the current data set to accommodate changes. Here's the definition for the range I called "chartY" for my test, where cell I3 is a Data Validation dropdown: =OFFSET(Sheet1!$H$5:$H$10,0,MATCH(Sheet1!$I$3,Sheet1!$I$4:$Z$4,0))

Book1
HIJK
3Chart who:John
4DateJohnBobGeorge
51/1/20109607210
62/1/2010355883836
73/1/2010892323210
84/1/2010485756172
95/1/201031939220
106/1/201035665637
11
12
13DateBob
141/1/20107
152/1/2010883
163/1/2010323
174/1/2010756
185/1/201039
196/1/2010665
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,634
Members
452,934
Latest member
Jdsonne31

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top