Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Alex
 
Posts: n/a
Default Excel Charting problem..

Hello

I am creating a chart and want to be able to change the yvalues depending
upon criteria selected in a dropdown box.

I have a problem with non-contiguous cells.

In my worksheets I want the yvals to be 6 values based upon non-conitguous
data e.g.

Cells(1,5) Cells(3, 5) Cells(5,7), Cells(7,7) Cells (9,7), Cells(11,7)

I need to use the Cells( row, column) format as opposed to Range("E1") for
example.

When using non-contiguous cells this will work...

Set yvals = Worksheets("Sheet 1").Range(Cells(1,5), Cells(5,5))
ActiveChart.SeriesCollection(1).Values = yvals


How do i do a similar thing but allow a refernce to non-coniguous cells as
described.?

I'd be both grateful and interested in learning how this can be done. Any
help would be warmly appreciated.

By the way, I am using Excel 97...

Regards


Alex

  #2   Report Post  
Bryan Hessey
 
Posts: n/a
Default


I would probably go the simple route and select a range of 6 helper
y-cells and set them with the contents of the required non-contiguous
cells,
thus (using the Y column as a blank-helper)
Y1 = A1
Y2 =C5
Y3 =G7
Y4 =I7
Y5 =K7
etc, giving a contiguous set for use in your macro.


Alex Wrote:
Hello

I am creating a chart and want to be able to change the yvalues
depending
upon criteria selected in a dropdown box.

I have a problem with non-contiguous cells.

In my worksheets I want the yvals to be 6 values based upon
non-conitguous
data e.g.

Cells(1,5) Cells(3, 5) Cells(5,7), Cells(7,7) Cells (9,7), Cells(11,7)

I need to use the Cells( row, column) format as opposed to Range("E1")
for
example.

When using non-contiguous cells this will work...

Set yvals = Worksheets("Sheet 1").Range(Cells(1,5), Cells(5,5))
ActiveChart.SeriesCollection(1).Values = yvals


How do i do a similar thing but allow a refernce to non-coniguous cells
as
described.?

I'd be both grateful and interested in learning how this can be done.
Any
help would be warmly appreciated.

By the way, I am using Excel 97...

Regards


Alex



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=393264

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
sorting problem in excel 2000 inenewbl Excel Discussion (Misc queries) 1 June 13th 05 04:48 AM
Excel 2003 Slowness problem in Windows XP Elton Seng Yan Thung Excel Discussion (Misc queries) 2 May 18th 05 04:55 AM
EXCEL FORMAT PROBLEM WHEN SENDING EXCEL SHEET AS MESSAGE BODY IN . P.S.Sodha Excel Discussion (Misc queries) 0 April 2nd 05 01:53 PM
EXCEL 2003 PROBLEM Amandle Excel Worksheet Functions 4 April 1st 05 02:25 PM
Staring Excel Problem Everton Excel Discussion (Misc queries) 1 November 26th 04 09:22 PM


All times are GMT +1. The time now is 09:13 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"