# Dynamic chart range

This is a discussion on Dynamic chart range within the Excel Questions forums, part of the Question Forums category; Hi all, I have a problem with the chart range. I had a lookat the site of Tushar-Meta ( http://www.tushar-mehta.com ...

1. ## Dynamic chart range

Hi all,

I have a problem with the chart range. I had a lookat the site of Tushar-Meta (http://www.tushar-mehta.com).

The problem is the following:

x axes is column A
y axes is colum B, D, H, K and Z

How do I get these column in the ranges for the y axes.

JH

2. ## Re: Dynamic chart range

Hi JH,

If you are looking at Tushar's Dynamic Charts page item 1, where he has . . . .

===========================
Create the names

'Basic Range'!XValues =OFFSET('Basic Range'!YValues,0,-1)
'Basic Range'!YValues =OFFSET('Basic Range'!\$B\$5,0,0,COUNTA('Basic Range'!\$B:\$B)-1,1)

where 'Basic Range' is the name of the worksheet containing this example. The '-1' in the definition of YValues adjusts for the cell containing the word 'Price' (cell B4). Also, one must be careful and ensure that nothing else is entered in any cell in column B -- at least not without adjusting the formula above.

The next and final step is to create a chart with the formula
=SERIES(,'Basic Range'!XValues,'Basic Range'!YValues,1)

=========================================

to add any extra range to the chart, you need to define a new dynamic range, and then add it as a new chart series.

For example, to add the series in column D,

Go to Insert, Name, Define and create the name:

'Basic Range'!DYValues =OFFSET('Basic Range'!Yvalues,0,2)

[this points to a range 2 columns across from the Y range]

Then go to the chart and add a second series:

=SERIES(,'Basic Range'!XValues,'Basic Range'!DYValues,2)

If this works for you, then do the same thing for columns H,K & Z.

Cheers,
Linus

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•