Macro Help - Simple Copy and Paste Until Null Cell Reached

The Ruff Report

New Member
Joined
Jun 17, 2023
Messages
19
Office Version
  1. 365
Platform
  1. 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.

Picture4.png




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
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,223,714
Messages
6,174,044
Members
452,542
Latest member
Bricklin

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