Macro or Formula to read through list of stores

dacookmgnt

New Member
Joined
Feb 3, 2004
Messages
14
Book2
ABCDEFGHI
1
2StoreAprMayStoreAprMay
3002011700001660000020110000098000
4002029000088000
5002038000078000
6002017000068000
7002026000058000
8002035000048000
9
10
11
12
13
14
Sheet1


I would like to read through a list of stores, update the graph for each store location, and print it out. Any ideas on a macro or formula to do this?
Thank you.

I just noticed that you cannot see the graph? I'm not sure that is necessary though.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I would like to read through a list:
00201
00202
00203

I need Cell +A3 to refer to 00201, update the graph and print it, then have +A3 refer to 00202, update the graph and print it. I would like to loop through the list about 80 times.

For some reason the software did not copy the graph into my message. I just started using it so I probably don’t know what I am doing.
 
Upvote 0
Just replied to put my question back at the top of the list. I, myself, have never been able to grow a mustache, much less a Fu Manchu. Plenty of back hair though, no problem.
 
Upvote 0
Hi daccokmgnt:

Try ...
Code:
Sub yPickValuesFromColumnGOneByOneMakeChartAndprint()
    Do
        Range("A3").Value = InputBox("enter Store's number to plot")
        If Range("A3").Value = "99999" Then Worksheets("sheet3").Select: Range("B3:C3").ClearContents: Exit Sub
        Range("B3").Value = WorksheetFunction.SumIf([sheet3!G4:G8], [Sheet3!A3], [sheet3!H4:H8])
        Range("C3").Value = WorksheetFunction.SumIf([sheet3!G4:G8], [Sheet3!A3], [sheet3!I4:I8])
        strTitle = "Store " & [Sheet3!A3]
        Range("B2:C3").Select
        Charts.Add
        ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet3"
        With ActiveChart
            .HasTitle = True
            .ChartTitle.Characters.Text = strTitle
            .Axes(xlCategory, xlPrimary).HasTitle = False
            .Axes(xlValue, xlPrimary).HasTitle = False
        End With
        ActiveWindow.SelectedSheets.PrintPreview
    Loop
End Sub
I hope this gets you started!
 
Upvote 0

Forum statistics

Threads
1,214,874
Messages
6,122,036
Members
449,062
Latest member
mike575

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top