Copy non blank cells to another worksheet
Norman Jones wrote:
Hi JD,
Try the following version which avoids selections:
'=============
Sub CopyDataOnly()
On Error Resume Next
Sheets("Sheet1").Range("A10:A100"). _
SpecialCells(xlCellTypeConstants, 23).Copy
Sheets("Sheet2").Range("A10").PasteSpecial _
Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
On Error GoTo 0
Application.CutCopyMode = False
End Sub
'<<=============
Selections are rarely necessary or desirable.
Thanks Norman, that works a treat.
|