PC Review


Reply
Thread Tools Rate Thread

Changing graph axes using named range

 
 
simon.stewart@uk.fid-intl.com
Guest
Posts: n/a
 
      5th Apr 2007
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 With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      5th Apr 2007
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


"(E-Mail Removed)" 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
graph column line graph with two axes trichens Microsoft Excel Charting 1 26th Apr 2010 07:58 PM
Named Range Graph Data =?Utf-8?B?TWU=?= Microsoft Excel Charting 1 14th Nov 2007 05:29 PM
Changing graph axes using named range simon.stewart@uk.fid-intl.com Microsoft Excel Charting 2 5th Apr 2007 03:51 PM
Blank cells in named range- how to ignore them when making my graph? Help plz! KR Microsoft Excel Misc 0 24th Aug 2005 02:35 PM
need help adding named range as new series to a graph Keith R Microsoft Excel Programming 1 24th Oct 2003 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:36 PM.