If you want to copy data into next empty cell in new sheet then try to use the following code i hope by using the following code.
Code:
Sub Rows_with_numbers()
Dim X11 As Long
Dim Last_row As Long
Dim Source1 As Worksheet
Dim Destination1 As Worksheet
Dim Rows_with_numbers As Range
Set Source1 = Worksheets("name")
Set Destination1 = Worksheets("name")
With Source1
Last_row = .Cells(.Rows.Count, "E").End(X1lUp).Row
For X1 = 2 To Last_row
If IsNumeric(.Cells(X1, "E").Value) And .Cells(X1, "E").Value <> "" Then
If Rows_with_numbers Is Nothing Then
Set Rows_with_numbers = .Cells(X1, "E")
Else
Set Rows_with_numbers = Union(Rows_with_numbers, .Cells(X1, "E"))
End If
End If
NeX1t
If Not Rows_with_numbers Is Nothing Then
Rows_with_numbers.EntireRow.Copy Destination1.Range("A4")
End If
End With
MsgBoX1 "Data has been updated !", vbEX1clamation + vbInformation, " Name"
End Sub
Bookmarks