misiek5510
New Member
- Joined
- May 25, 2021
- Messages
- 38
- Office Version
- 2016
- Platform
- Windows
- Mobile
HI all,
I have the following macro which works, however is selecting blank cells which is causing problems. The cells are blank however are containing formulas, but since I'm coping them as values only it shouldn't matter?
When I paste it on the sheet "Data" it Pastes with the blank cells, and next time I use this macro it pastes AFTER the blank cells instead of right after the last row with data.
Sub add()
Range("B5").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Data").Select
Range("Data[[#Headers],[Site]]").Select
Selection.End(xlDown).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
End Sub
I have the following macro which works, however is selecting blank cells which is causing problems. The cells are blank however are containing formulas, but since I'm coping them as values only it shouldn't matter?
When I paste it on the sheet "Data" it Pastes with the blank cells, and next time I use this macro it pastes AFTER the blank cells instead of right after the last row with data.
Sub add()
Range("B5").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Data").Select
Range("Data[[#Headers],[Site]]").Select
Selection.End(xlDown).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
End Sub