Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble with Union
Please see below for original thread.
I've updated the code to read: ActiveChart.SetSourceData Source:=Sheets("Graph Data").Union(Range(Cells(1, 1), Cells(PriceBandCounter, 1)), Range(Cells(1, 7), Cells(PriceBandCounter, 7))), PlotBy:=xlRows This is returning a Run Time Error 438, Object doesn't support this property or method... -----Original Message----- Union(Range(Cells(1, 1), Cells(21, 1)), Range(Cells(1, 7), Cells(10,7))) -- Regards, Tom Ogilvy "SoCalExcel" wrote in message ... I'm writing code to update a command very similar to ActiveChart.SetSourceData Source:=Sheets("Graph Data").Range("A1:A21,G1:M21"), PlotBy:=xlRows except I need to do it using the 'Cells()' format. For example, instead of using Range("A1:A21,G1:M21") since I'm using variables to reference the range, I believe I need to use the 'Cells()' format instead of the "A1:.." format. My attempts have looked something like: Range((Cells(1, 1), Cells(21, 1), (Cells(1, 7), Cells (10, 7)) This isn't working. Any help is greatly appreciated. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Been Answered - Please Ignore...
-----Original Message----- Please see below for original thread. I've updated the code to read: ActiveChart.SetSourceData Source:=Sheets("Graph Data").Union(Range(Cells(1, 1), Cells(PriceBandCounter, 1)), Range(Cells(1, 7), Cells(PriceBandCounter, 7))), PlotBy:=xlRows This is returning a Run Time Error 438, Object doesn't support this property or method... -----Original Message----- Union(Range(Cells(1, 1), Cells(21, 1)), Range(Cells(1, 7), Cells(10,7))) -- Regards, Tom Ogilvy "SoCalExcel" wrote in message ... I'm writing code to update a command very similar to ActiveChart.SetSourceData Source:=Sheets("Graph Data").Range("A1:A21,G1:M21"), PlotBy:=xlRows except I need to do it using the 'Cells()' format. For example, instead of using Range("A1:A21,G1:M21") since I'm using variables to reference the range, I believe I need to use the 'Cells()' format instead of the "A1:.." format. My attempts have looked something like: Range((Cells(1, 1), Cells(21, 1), (Cells(1, 7), Cells (10, 7)) This isn't working. Any help is greatly appreciated. Thanks. . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble with Union
See my response to the original thread.
-- Regards, Tom Ogilvy "Ed" wrote in message ... Please see below for original thread. I've updated the code to read: ActiveChart.SetSourceData Source:=Sheets("Graph Data").Union(Range(Cells(1, 1), Cells(PriceBandCounter, 1)), Range(Cells(1, 7), Cells(PriceBandCounter, 7))), PlotBy:=xlRows This is returning a Run Time Error 438, Object doesn't support this property or method... -----Original Message----- Union(Range(Cells(1, 1), Cells(21, 1)), Range(Cells(1, 7), Cells(10,7))) -- Regards, Tom Ogilvy "SoCalExcel" wrote in message ... I'm writing code to update a command very similar to ActiveChart.SetSourceData Source:=Sheets("Graph Data").Range("A1:A21,G1:M21"), PlotBy:=xlRows except I need to do it using the 'Cells()' format. For example, instead of using Range("A1:A21,G1:M21") since I'm using variables to reference the range, I believe I need to use the 'Cells()' format instead of the "A1:.." format. My attempts have looked something like: Range((Cells(1, 1), Cells(21, 1), (Cells(1, 7), Cells (10, 7)) This isn't working. Any help is greatly appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use union reference operator? | Excel Discussion (Misc queries) | |||
union range | Excel Discussion (Misc queries) | |||
UNION of Arrays - is possible? | Excel Discussion (Misc queries) | |||
Help w/ Union Queries | Excel Discussion (Misc queries) | |||
VBA union of two ranges | Excel Programming |