Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying following code that combines two ranges and sets the
resulting range to values and XValues in a sereis. The part I am having trouble is With pieChart.SeriesCollection.NewSeries .Name = "Portfolio Allocation" .values = stockValues .XValues = names End With Its complaining about setting .values to stockValues, Whats wrong here? Private Sub RefreshAllocationChart() Dim pieChart As Chart Set pieChart = Worksheets("Main").ChartObjects(1).Chart Do While pieChart.SeriesCollection.Count < 0 pieChart.SeriesCollection(1).Delete Loop Dim names As Range Dim values As Range Set names = Range(Range("StockSymbols"), Range("Cash")) Set stockValues = Range(Range("StockValues"), Range("CashValue")) With pieChart.SeriesCollection.NewSeries .Name = "Portfolio Allocation" .values = stockValues .XValues = names End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I combine worksheets w/o enough rows to combine? | Excel Worksheet Functions | |||
Combine multiple ranges into one worksheet | Excel Discussion (Misc queries) | |||
Combine cells with the same reference and combine quantities | Excel Discussion (Misc queries) | |||
Combine 2 ranges in different sheets using Pivot Table | Excel Discussion (Misc queries) | |||
Combine ranges from 2 sheet into 3rd | Excel Programming |