I have data on one sheet:
Day Day Day Day Day
Store #
Store #
Store #
I would like to create a graph for a specific time period (7 days) for each store on a new sheet. This is what I have so far:
I know something is wrong with my loop statement and I can't figure out how to make it create a new sheet for each graph. Forgive me, I'm a newbie to VBA.Sub Macro2() ' Set Do loop to stop when two consecutive empty cells are reached. Do Until IsEmpty(ActiveCell) And IsEmpty(ActiveCell.Offset(1, 0)) ActiveSheet.Shapes.AddChart.Select ActiveChart.ChartType = xlLineMarkers ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(1).Name = "=Sheet1!$B3" ActiveChart.SeriesCollection(1).Values = "=Sheet1!$C3:$H3" ActiveChart.SeriesCollection(1).XValues = "=Sheet1!$C$2:$H$2" Range("B18").Select ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.ChartArea.Copy ActiveWindow.SmallScroll Down:=9 Range("B18").Select ActiveCell.Offset(2, 0).Select Loop End Sub
Any help is greatly appreciated. Thanks, in advance!
Cindy
Hi
Why do you need to create a new graph for each item? Why not create one graph, and have a selection process that allows you to select each store and have the graph update for the selected store?
rylo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks