Glasgowsmile
Active Member
- Joined
- Apr 14, 2018
- Messages
- 280
- Office Version
- 365
- Platform
- Windows
Good morning,
I have the following macro. I simply want it to look at A1 on the current worksheet, if that cell has data then move down to A2. Then the next time I important data it will look at A2 and paste in A3 etc.
Not quite sure how to do this myself, any help is appreciated!
I have the following macro. I simply want it to look at A1 on the current worksheet, if that cell has data then move down to A2. Then the next time I important data it will look at A2 and paste in A3 etc.
Not quite sure how to do this myself, any help is appreciated!
VBA Code:
Private Sub CommandButton1_Click()
Application.DisplayAlerts = False
Dim crnt As Workbook
Dim source As Workbook
With Application.FileDialog(msoFileDialogOpen)
.Filters.Clear
.Filters.Add "CSV Files", "*.csv"
.AllowMultiSelect = False
.Show
If .SelectedItems.Count > 0 Then
Workbooks.Open .SelectedItems(1)
Set source = ActiveWorkbook
Sheets("Day").Range("A22").Copy
Sheet1.Range("A1").PasteSpecial xlPasteValues
End If
End Sub