The Ruff Report
New Member
- Joined
- Jun 17, 2023
- Messages
- 19
- Office Version
- 365
- Platform
- Windows
I have gone through some other loop posts but haven't quite found what I'm looking for. In the macro below, X can be anywhere from 50 stores to 250 stores. Instead of updating X, I'd like the most basic way for the macro to run until it reaches the first blank cell in column A of the Master, then ideally, a message box that all reports have been created. Thanks in advance.
Sub UntilCellEmptyMacro()
' Copy data in column A and paste into column B until Column A is null
Dim X As Integer
X = 1
Do Until X = 222
Workbooks("Master.xlsm").Sheets("Vendor List").Range("A" & X).Copy Destination:=Workbooks("Template.xlsx").Sheets("Vendor").Range("A1")
' Do various calculations in the Template workbook and save as Store Name
X = X + 1
Application.CutCopyMode = False
Loop
End Sub
Sub UntilCellEmptyMacro()
' Copy data in column A and paste into column B until Column A is null
Dim X As Integer
X = 1
Do Until X = 222
Workbooks("Master.xlsm").Sheets("Vendor List").Range("A" & X).Copy Destination:=Workbooks("Template.xlsx").Sheets("Vendor").Range("A1")
' Do various calculations in the Template workbook and save as Store Name
X = X + 1
Application.CutCopyMode = False
Loop
End Sub