User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Maddening Excel problem... Page [1]  
Wyloch
All American
4244 Posts
user info
edit post

The situation:
- I have a worksheet called "ANC Data" with data in it.
- Using VBA, I want to plot K1:AK1 against K20:AK20.
- I have an independant chart (not a chart object in a worksheet) called "F14"


I want to change the x and y ranges for the series on the chart. These lines does not work:

Sheets("F14").SeriesCollection(1).XValues = "='ANC Data'!K1:AK1"
Sheets("F14").SeriesCollection(1).Values = "='ANC Data'!K20:AK20"

However, this line (which I used as a test) DOES work:
Sheets("F14").SeriesCollection(1).XValues = "={5,5,5,5}"

Anyone know what's going on?

10/5/2007 1:20:19 PM

Wyloch
All American
4244 Posts
user info
edit post

Google offers no help.

10/5/2007 1:21:06 PM

Wyloch
All American
4244 Posts
user info
edit post

Nm. Got it. Pays to be awesome.

10/5/2007 1:39:01 PM

GraniteBalls
Aging fast
12262 Posts
user info
edit post

howd you do it?

10/5/2007 1:41:03 PM

Wyloch
All American
4244 Posts
user info
edit post

Sheets("F14").SeriesCollection(1).XValues = Sheets("ANC Data").Range(Sheets("ANC Data").Cells(1, 11), Sheets("ANC Data").Cells(1, 37))


It's a mess, but it works.

Actually, when I try to run it a second time, specifying a new range, it does not work. It appear that it (VBA in Excel) cannot overwrite anything...

10/5/2007 1:43:05 PM

 Message Boards » Tech Talk » Maddening Excel problem... Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.