It is currently Mon Sep 06, 2010 6:58 am




Post new topic Reply to topic  [ 1 post ] 
 Excel - Dynamic (auto expanding) chart using a Defined Name 
Author Message
Site Admin

Joined: Fri May 29, 2009 10:41 am
Posts: 25
Location: Milton Keynes, UK
Post Excel - Dynamic (auto expanding) chart using a Defined Name
If you have ever wanted your charts range to update when new values are added then follow the steps below. You need to create a Defined Names that expand for the Category (X) axis lables and also for each series.

1. Choose menu option Insert>Name>Define...
2. Give each a useful name (In this example I have used ChartAxisX)
3. In the Refers to box type the following formula
(This is assuming the your worksheet is called Sheet1 and your chart data starts in column A)
Code:
=OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,1)

You will then need to define a name for each series in your chart by repeating step 1 to 3 using the formula below. (In this example I have used the name ChartValues1)
Code:
=OFFSET(Sheet1!ChartAxisX,0,1)

The above formula uses the Contents of the ChartAxisX to determine size and then offsets the range by 1 column. (For each additional series you will need to change the value to 2,3,4,... and so on.)

We then need to create a chart using the new Defined Names.
4. Choose menu option Insert>Chart...
5. Select the required chart type and click Next
6. Click the Series tab, then Add a series (use the following formulas)
Category (X) axis labels:
Code:
=Sheet1!UnitsChartAxisX

Values:
Code:
=Sheet1!ChartValues1

7. Click Finish

_________________
Damo


Tue Jun 02, 2009 10:21 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.