Hello Im newbie and need help.
The hotel accommodates guests for longer stays. Each sheet represents one month of the year. If the guest arrives in January but does not leave in January, I need their data to be moved to sheet2. I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("I:I")) Is Nothing Then
Application.ScreenUpdating = False
Target.EntireRow.Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(4, 0)
End If
Application.ScreenUpdating = True
End Sub
The problem is that if I later add the departure date in Sheet1 to date January, the data will still remain in Sheet2. Would anyone be able to advise me?
The hotel accommodates guests for longer stays. Each sheet represents one month of the year. If the guest arrives in January but does not leave in January, I need their data to be moved to sheet2. I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("I:I")) Is Nothing Then
Application.ScreenUpdating = False
Target.EntireRow.Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(4, 0)
End If
Application.ScreenUpdating = True
End Sub
The problem is that if I later add the departure date in Sheet1 to date January, the data will still remain in Sheet2. Would anyone be able to advise me?