Excel Chart Will Not Accept Named Range Based on INDIRECT Function

rkaczano

Board Regular
Joined
Jul 24, 2013
Messages
141
Office Version
  1. 365
Platform
  1. Windows
I have a range that I have built up using the address function:


A1 = the cell range $A$37:$A$780
A2= is the existing sheet name = Profile
A3 = is the full range including the sheet and cell range 'Profile'!$A$37:$A$780

And I know the range in A3 works as I can put it in a SUM formula and the answer is correct.

=SUM(INDIRECT(A3)) = a number

I now want to pass the range in A3 to a Chart. I know I cannot pass a cell address expressed as text to a chart series. So I created a named range and wrapped the cell address expressed as text in A3 as follows:
Name: = ChartRangeVariable
Refers to: =INDIRECT('Profile'!$A$3)

However the chart will not accept that named range. Is this not possible?

Thanks
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I would create a named range for a range that gets the data from other ranges based on a cell value.

Lets say you have 10 ranges that could potentially be the data for the chart. Put formula(s) in a single location that read the data from any of those 10 ranges based on the contents of a single cell. Make that range a Named Range that you reference in your chart. Change the cell value to reference a different range and the chart is updated.
 
Upvote 0
Thanks, I need you to elaborate on that a little more.

Lets say I know the following below. There are 12x ranges defined by the table below (e.g. the first range is $A$37:$A$780. My Chart needs to graph the data from that range. I am trying to provide the chart with this range using a named range with an INDIRECT formula. Are you saying that I should create a large 2x2 table with cells that pull data form all those ranges and then have a dynamic named range (using OFFSET) for the column I want and then have the graph feed off of that named range?


$A$37$A$781$A$1453$A$2197$A$2917$A$3661$A$4381$A$5125$A$5869$A$6589$A$7333$A$8053
$A$780$A$1452$A$2196$A$2916$A$3660$A$4380$A$5124$A$5868$A$6588$A$7332$A$8052$A$8796
 
Upvote 0
So, in this example, I added a series of numbers in column A as dummy data. The formula in Cell P2 spills down according to the cell references in rows 1 and 2. I Named the Range from P2 down is a dynamic named range that changes in size according to the number of rows of returned data. Cell N2 is where you choose your values. Changing this changes which column of cell references you want to use. The chart will reference the named range Chart_Series_Values

test.xlsb
ABCDEFGHIJKLMNOPQ
1$A$37$A$781$A$1453$A$2197$A$2917$A$3661$A$4381$A$5125$A$5869$A$6589$A$7333$A$8053SeriesChart Series Values
2$A$780$A$1452$A$2196$A$2916$A$3660$A$4380$A$5124$A$5868$A$6588$A$7332$A$8052$A$87962842
3842
4842
5Values for Chart843
621843
732843
833844
964844
1085849
1196850
1297851
13108853
14109854
151010856
161011857
171212860
181313861
191314861
201415862
211416863
Sheet6
Cell Formulas
RangeFormula
P2:P673P2=INDIRECT(INDEX(ChartRangeRef,1,SeriesChoice)&":"&INDEX(ChartRangeRef,2,SeriesChoice))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
ChartRangeRef=Sheet6!$A$1:$L$2P2
SeriesChoice=Sheet6!$N$2P2
 
Upvote 0
Solution

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

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