Dynamic chart with Named ranges

mrxlsx

Board Regular
Joined
Dec 15, 2012
Messages
95
Hi all,
I have difficulty in building OFFSET formula to access my chart data dynamically. My data layout is as below.



State
FL
AZ
TX
ID
Qty
xxx
xxx
xxx
xxx
Sales
xxx
xxx
xxx
xxx
Cost
xxx
xxx
xxx
xxx
Profit
xx
xxx
xxx
xxx

<tbody>
</tbody>

If I select any
State in the cell A8, I should get the chart highlighting with all the Qty, Sales, Cost, Profit etc with the State name as the chart title. If I change the State in the drop down, data should change accordingly.


I tried to use OFFSET with the combination of some Named ranges, but some how I am not clear on how to link the data to chart as well as building the correct formula.

Please help me.
Thanks everybody.

InteractiveChart - Download - 4shared - farida perveen

mrxlsx
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
If your data starts in cell Sheet1!A1, define the following names:

"Values" =
Code:
=OFFSET(Sheet1!$A$1,1,MATCH(Sheet1!$A$8,Sheet1!$1:$1,0)-1,4,1)
"Title" =
Code:
=OFFSET(Sheet1!$A$1,0,MATCH(Sheet1!$A$8,Sheet1!$1:$1,0)-1,1,1)
Then use these in your chart.

The chart title will be:

Code:
Sheet1!Title
The series values (y values) will be:

Code:
Sheet1!Values
Those references will actually default to the name of your workbook (if you set the names' Scope to 'Workbook') but you can still input them like that (or you could use, e.g., "Book1!Title").

Note: You could also simply set the chart title as "=$A$8".

Hope this helps,

Chris.
 
Upvote 0
Hi Chris,

Thanks for the effort !!

Even I built the same formula and I posted here just to make sure mine is right. But somehow the OFFSET formula is not updating when I change the selection choice. The prescribed formula is showing the values for all the values for all the states. What I want to see in the chart is the values for Qty, Sales, Cost, Profit only for the selected state and not for other states. Anything am I missing in the cooking process??

mrxlsx
 
Upvote 0
Chris,

Sorry for bothering you. The same formula I am using, but charts were showing up each and every item...meaning all the value for all the states which is not my requirement. Are they working according to my requirement at your end? Can you give a hint of the process of linking and naming the cells or else post the finished Excel sheet's link so that much of the explanation part can be avoided. We will see if something goes wrong later.

Thank you very much for all your effort man!
mrxlsx
 
Upvote 0
Well, I basically started by selecting A1:B5 and inserting a column chart.

You might need to switch the data (button in the middle of 'Select Data') so that A2:A5 are on the right-hand side. Then I just applied the names to the series on the left.

Here's a link to an example workbook:

https://app.box.com/s/3h1d4svrntexwp3tt8f8

Hope this helps,

Chris.
 
Upvote 0
Chris,

At last it's working fine. I have taken this trick to the next level with my office data. I work on 32 columnar data seamlessly. It's just working fine. The only problem I have faced at is linking them to the chart which was corrected by your instructional steps. Thank you very much.

mrxlsx
 
Upvote 0

Forum statistics

Threads
1,215,449
Messages
6,124,911
Members
449,195
Latest member
Stevenciu

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