Hi,
I manually have my custom sorting as:
Column B (Surgery Date) - Oldest to Newest
then
Column F (Surgeon) - A to Z
Currently, I have the code below to sort by the Surgery Date by Oldest to Newest which has been working great but how do I add Column F (Surgeon) - A to Z as the secondary sort?
This is my current code:
Thank you in advance
I manually have my custom sorting as:
Column B (Surgery Date) - Oldest to Newest
then
Column F (Surgeon) - A to Z
Currently, I have the code below to sort by the Surgery Date by Oldest to Newest which has been working great but how do I add Column F (Surgeon) - A to Z as the secondary sort?
This is my current code:
VBA Code:
Option Explicit
Private Sub Workbook_Open()
If ActiveSheet.Name = Sheet1.Name Then
'Start Timeout Timer
checktime = False
Call checktimer
'Check Timeout timer
checktime = True
Lastchange = Now()
End If
Dim cel As Range
Application.ScreenUpdating = False
ThisWorkbook.RefreshAll
With Sheets("IPS Cases")
On Error Resume Next
ThisWorkbook.Sheets("IPS Cases").Range("B2").Sort Key1:=ThisWorkbook.Sheets("IPS Cases").Range("B3"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
On Error GoTo 0
For Each cel In .Range("A2:BP200")
With cel
.Errors(8).Ignore = True
.Errors(9).Ignore = True
.Errors(6).Ignore = True
End With
Next cel
End With
Application.ScreenUpdating = True
End Sub
Thank you in advance