Article ID: 193249
Article Last Modified on 6/17/2005
C3: D3: Region 1 E3: Region 2 F3: Region 3
C4: Jan D4: 10 E4: 80 F4: 15
C5: Feb D5: 20 E5: 70 F5: 25
C6: Mar D6: 30 E6: 60 F6: 35
C7: Apr D7: 40 E7: 50 F7: 45
Sub CreateChart()
Dim ChartRange As Range
' Set variable to the entire region to be charted.
Set ChartRange = Range("c4").CurrentRegion
' Add a new chart to the worksheet.
Charts.Add
With ActiveChart
' Set the type of chart.
.ChartType = xlLineMarkers
' Set the source range for the chart.
.SourceData Source:=ChartRange
' This macro assumes that your data resides n a worksheet named
' "Sheet1". Change the Name argument to match the name of your
' worksheet.
.Location Where:=XlLocationAsObject, Name:="Sheet1"
End With
End Sub
Additional query words: XL98
Keywords: kbhowto kbdtacode KB193249