Dear All,
With the help of ExcelForum members, I have created following Macro, which
is successfully getting executed and bringing the desired results. However,
the problem is, even there is no data to transfer, the Macro is getting executed.
I want to add a command line, if there is not data, then MsgBox should appear
with message "NOTHING TO TRANSFER".
Please help with suitable command line.
---------------------
Sub TransferData()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Range("Y1", Range("Y" & Rows.Count).End(xlUp)).AutoFilter 1, "Complete"
Range("A5", Range("AC" & Rows.Count).End(xlUp)).Copy Sheet2.Range("A" & Rows.Count).End(xlUp)(2)
Range("A5", Range("AC" & Rows.Count).End(xlUp)).Delete
[Y1].AutoFilter
Application.CutCopyMode = False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Sheet2.Select
End Sub
-----------------------
Bookmarks