Hello,
I currently have macros that will auto-sort dates in C8:C208. Is it possible to modify the code so that it does not auto-sort until data is also entered in the adjacent D and E cells? So, for example, I would enter the date in C8, enter data in D8, enter data in E8, and then it would auto-sort column C by date.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Range("C8").Sort Key1:=Range("C9"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub
Thank you
I currently have macros that will auto-sort dates in C8:C208. Is it possible to modify the code so that it does not auto-sort until data is also entered in the adjacent D and E cells? So, for example, I would enter the date in C8, enter data in D8, enter data in E8, and then it would auto-sort column C by date.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Range("C8").Sort Key1:=Range("C9"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub
Thank you