LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Gary's Student
 
Posts: n/a
Default Automatically set chart axis labels from cell contents

I have lots of scatter charts plotting data in columns. At the top of each
column is a cell containing the label I want to appear on the axis. I would
like the axis to be re-labeled whenever the label cells change automatically.
I am currently doing this with a little macro:

Sub setlabel()
Dim x As String
x = Cells(1, 1)
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
With ActiveChart
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = x
End With
End Sub

This is not automatic. Is there a way to perform this automatically without
resorting to VBA trickery??
--
Gary's Student
 
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
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Fan charts Dean Charts and Charting in Excel 7 May 30th 05 11:51 AM
How do I not include empty cell value chart labels in pie charts? JMarble Charts and Charting in Excel 1 May 13th 05 08:38 PM
Labels on Chart with Negative Value Axis David F. Schrader Charts and Charting in Excel 6 December 17th 04 06:25 PM
Linking Axis Labels Neil Charts and Charting in Excel 2 December 5th 04 09:04 PM


All times are GMT +1. The time now is 10:11 PM.

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"