Dynamic Chart From different Sheet

Msadiqrajani

Board Regular
Joined
Jan 17, 2009
Messages
107
Hi,
I have different dataset of same size on different.

What I want is to choose Sheet name from dropdown list and Chart got data of that sheet.

Suppose I have 3 sheets Sheet1, Sheet2 and Sheet3.

When I select Sheet 1 from dropdown list Chart will be created with data on that sheet.

What I have done is have created dynamic name range using Indirect function thats working. But when I am using this in chart as range it throws error.

This is formula I am using creating Dynamic name Range

Code:
=INDIRECT("'"&Model!$B$2&"'"&"!A3:A183")

Using Cell B2 Value as Sheet name

This formula for chart value.

Code:
=SERIES(,Model.xlsx!chDate,'S&P 500'!$B$2:$B$183,1)
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Are you sure that the dynamic name range using Indirect function is working? How did you check it?
 
Upvote 0
You say : "But when I am using this in chart as range it throws error." ... what error happens exactly?
 
Upvote 0
It throws this error..

"A formula in worksheet contains one or more invalid reference.

Verify that your formula contains a valid path,workbook,name range and cell reference"
 
Upvote 0
Choose a name that does not start with ch ... Excel can be fussy about that.
 
Upvote 0
Hi,
Its working now...
Created new Name range with same formula and new chart.
When entering name range to Chart series, instead of entering directly into formula bar, I select name range by right click>select data.

Thanks for your time....
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,792
Members
452,942
Latest member
VijayNewtoExcel

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