LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Charts Range Setting

Hi All
I have a predefined chart that I want to set the range collection
dynamically from VBA code. That works OK.

A mixed bar-line chart for 12 months of the year on the X-Axis. My problem
stems from variable number of values for each bar/line.

I set the ranges as follows.....

With chSales
.SeriesCollection(1).Values = shSales.Range("B29:B" & BMax)
.SeriesCollection(2).Values = shSales.Range("E29:E" & EMax)
.SeriesCollection(3).Values = shSales.Range("J29:J" & BMax)
.SeriesCollection(4).Values = shSales.Range("K29:K" & EMax)
.SeriesCollection(1).XValues = shSales.Range("A29:A40")
End With

The BMax and EMax ranges are variable length from 1 to 12 values. The X
values are fixed at 12. The problem arises in that the chart displays ONLY
the X-values up to the B or E max vlaues whichever is grerater. I need it
to show all 12 months regardless of how many values for the chart series
there are, and DO not want the lines in the chart to drop to zero for the
remainder of the chart.

It must be possible?

--
Cheers
Nigel




 
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
Help with setting up spreadsheet and charts please matthewluck1 Charts and Charting in Excel 6 November 24th 08 02:20 PM
Help setting up Charts matthewluck1 Charts and Charting in Excel 2 October 31st 08 11:34 AM
VBA for setting max value in scroll bars on charts? [email protected] Charts and Charting in Excel 3 July 26th 06 10:32 PM
Setting axes for 3-dimensional charts owc Charts and Charting in Excel 0 March 17th 06 07:20 PM
Setting source data range with Charts D Charts and Charting in Excel 2 January 1st 06 02:51 AM


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