but instead writing hello and I want to copy a value of cell A1 of sheet1 into Cell A3 of sheet2 in that interval, can you tell me how using that way?=IF(AND(Sheet1!A2>="12:20:00"*1,Sheet1!A2<="12:30:00"*1),"Hello","")
I did that so it will start to fill my values from A1 otherwise it started from A2Dim LastR As Range
With ThisWorkbook
Set LastR = .Sheets("sheet2").Range("A1")
If Not IsEmpty(LastR) Then _
Set LastR = .Sheets("sheet2").Range("A" & Rows.Count).End(xlUp)(2)
LastR = IF(AND(Sheet1!A2>="15:37:00"*1,Sheet1!A2<="15:38:00"*1),"Hello","")
End With
LastR = IF(AND(Sheet1!A2>="15:37:00"*1,Sheet1!A2<="15:38:00"*1),"Hello","")