Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I frequently make simple date & total graphs using rolling 52 week sales
totals for different product lines. The dates are always in the top row (D1:BC1). The totals are always the last row of those same columns (D though BC). Unfortunately the last row can change depending upon the number of products in that line. The recorded macro below works when the totals are on the 6th row. I've been trying to modify this with some sort of €ślastrow" function to dynamically change the "D6:BC6" to the appropriate row, but so far haven't been able to get anything I've tried to work. Please help. Range("D1:BC1,D6:BC6").Select Range("BC6").Activate Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.SetSourceData Source:=Sheets("week").Range("D1:BC1,D6:BC6") ActiveChart.Location Whe=xlLocationAsObject, Name:="week" ActiveChart.Axes(xlCategory).Select With ActiveChart.Axes(xlCategory) .MinimumScaleIsAuto = True .MaximumScaleIsAuto = True .BaseUnitIsAuto = True .MajorUnitIsAuto = True .MinorUnitIsAuto = True .Crosses = xlAutomatic .AxisBetweenCategories = True .ReversePlotOrder = True End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic charting | Charts and Charting in Excel | |||
dynamic charting | Charts and Charting in Excel | |||
Dynamic charting | Charts and Charting in Excel | |||
Dynamic Charting | Charts and Charting in Excel | |||
Dynamic Charting | Excel Discussion (Misc queries) |