I can't seem to get this code to work. Any ideas? This is my first time using a FOR statement in VBA.
Code:
Sub Sort()
Dim x As Long
Dim ws As Worksheet
For x = 1 To 8
Set ws = ThisWorkbook.Sheets("P" & x & " Figure 2-2")
Lr = ws.Range("A" & Rows.Count).End(xlUp).Row
If Lr > 3 Then
ws.Range("A3:O" & Lr).Sort Key1:=[C3], Order1:=xlAscending
ws.Range("A3:O" & Lr).Sort Key1:=[A3], Order1:=xlAscending
End If
Next x
End Sub