Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, While I'm comfortable with programming, I'm rusty and I have never see VBA before. I'm trying to make a macro that makes a graph with trendline based o whatever range of numbers I have selected. I guess that means that i the code below, I want to change the sheet and range references t whatever is currently selected. Your answer will be appreciated. Thanks. Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.SetSourceData Source:=Sheets("R INT").Range("AC12:AC15") ActiveChart.Location Whe=xlLocationAsObject, Name:="R1 INT" ActiveChart.SeriesCollection(1).Select ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLinear Forward:=0, _ Backward:=0, DisplayEquation:=True DisplayRSquared:=False).Select ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select Selection.Left = 141 Selection.Top = 1 End Su -- miker ----------------------------------------------------------------------- mikerr's Profile: http://www.excelforum.com/member.php...fo&userid=2583 View this thread: http://www.excelforum.com/showthread.php?threadid=39219 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data: select a cell x rows below the current, where x is designate | Excel Discussion (Misc queries) | |||
Macro €“ select all cells in current range | Excel Discussion (Misc queries) | |||
Select current region and print | Excel Programming | |||
UserForm to select current month or earlier | Excel Discussion (Misc queries) | |||
Select current region less one column | Excel Programming |