I apologize but I forgot timestamp statement. Here is the new macro:
Sub Macro1()
Dim sh1 As Worksheet
Dim sh2 As Worksheet
Dim sh1LastRow As Long
Dim sh2LastRow As Long
Dim r As Long
Set sh1 = ThisWorkbook.Sheets("sheet1")
Set sh2 = ThisWorkbook.Sheets("sheet2")
On Error Resume Next
sh1LastRow = sh1.Cells.Find("*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
sh2LastRow = sh2.Cells.Find("*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
On Error GoTo 0
For r = 1 To sh1LastRow
If sh1.Cells(r, "c") <> "" Or sh1.Cells(r, "e") <> "" Then
sh2LastRow = sh2LastRow + 1
sh1.Rows(r).Copy sh2.Cells(sh2LastRow, "a")
'here put timestamp on Sheet1
'sh1.Cells(r, "f") = Format(Now, "mm/dd/yyyy hh:mm:ss")
'here put timestamp on Sheet2
sh2.Cells(sh2LastRow, "f") = Format(Now, "mm/dd/yyyy hh:mm:ss")
End If
Next
End Sub
Regards,
Antonio
Bookmarks