Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey
Can anyone help me to make a macro which will allow me to add sources by activating a cell. I have the sources for the y axis. On the x-axis i would like to update by clicking on a specific cell. E.g If i add something to a cell in column B (say B1), the source data in the chart will automatically be updated to add content in column A (A1). This is what I have tried, but i just get an error message saying compile error: Expected: Then or GoTo Sub AddSourceData() ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("'Sheet2'!$B$10:$G$110") ActiveChart.ChartType = xlLineMarkers ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(1).Values = "='Sheet2'!$U$11:$U$110" ActiveChart.SeriesCollection(1).XValues = "='Sheet2'!$B$11" If ActiveCell.Activate.Then XValues = Offset (0, -1).Range "B11" End Sub Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Include info from data source in data table but not in chart | Charts and Charting in Excel | |||
pie chart & column chart w/same source data | Charts and Charting in Excel | |||
Use detailed data in one worksheet to create summary data as chart source | Charts and Charting in Excel | |||
How do you link chart source data when you copy the chart? | Charts and Charting in Excel | |||
Update a chart immediately after inputting data into data source | Charts and Charting in Excel |