Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Changing graph axes using named range

Hi,
I have a large table of data, each column is defined as a range. What
I would like to do is use the drop down list (using data validation)
where each option in the list is a named range, to change the graph's
x and y axes.
For example, if I were to select the named range for column C as my x
axis (using the drop down list) and column F as my Y axis, I would
like the graph to automatically plot this without going into the
=SERIES(<legend entry,<X Values,<Y Values,<PlotOrder)
formula and changing the named range manually. I have tried to
reference the cells in this formula where I have written the name of
the range's in them but it doesn't work.
Is there a macro I can make or is it easier than that?
Thanks a lot!
Simon

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Changing graph axes using named range

You can use a worksheet change function like the one below. I added my drop
drop down list in cell A1

Sub worksheet_change(ByVal target As Range)

If (target.Row = 1) And (target.Column = 1) Then

Sheets("sheet1").ChartObjects("Chart 3").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = target


End If

End Sub


" wrote:

Hi,
I have a large table of data, each column is defined as a range. What
I would like to do is use the drop down list (using data validation)
where each option in the list is a named range, to change the graph's
x and y axes.
For example, if I were to select the named range for column C as my x
axis (using the drop down list) and column F as my Y axis, I would
like the graph to automatically plot this without going into the
=SERIES(<legend entry,<X Values,<Y Values,<PlotOrder)
formula and changing the named range manually. I have tried to
reference the cells in this formula where I have written the name of
the range's in them but it doesn't work.
Is there a macro I can make or is it easier than that?
Thanks a lot!
Simon


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
graph column line graph with two axes trichens Charts and Charting in Excel 1 April 26th 10 07:58 PM
Named Range Graph Data Me Charts and Charting in Excel 1 November 14th 07 05:29 PM
Changing graph axes using named range [email protected] Charts and Charting in Excel 2 April 5th 07 03:51 PM
Blank cells in named range- how to ignore them when making my graph? Help plz! KR Excel Discussion (Misc queries) 0 August 24th 05 02:35 PM
need help adding named range as new series to a graph Keith R[_3_] Excel Programming 1 October 24th 03 09:29 PM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"