Hi, as you will see by the sample I've provided, the pages sort but column D get all mixed up . How can I ensure that all the data is sorted correctly. there is formula in Column D , which I belive may be causing the problem. Any advise would be appreciated Eccel 2007-10
Sub Comments()
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
Select Case wsSheet.CodeName
Case "Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6", "Sheet7", "Sheet8", "Sheet9", "Sheet10", "Sheet11", "Sheet12", "Sheet13"
With wsSheet.Range("A4:G151")
.Sort Key1:=.Range("G4"), Order1:=xlAscending, Header:=xlYes
End With
Case Else
'Nothing
End Select
Next wsSheet
End Sub
Sub Comments()
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
Select Case wsSheet.CodeName
Case "Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6", "Sheet7", "Sheet8", "Sheet9", "Sheet10", "Sheet11", "Sheet12", "Sheet13"
With wsSheet.Range("A4:G151")
.Sort Key1:=.Range("G4"), Order1:=xlAscending, Header:=xlYes
End With
Case Else
'Nothing
End Select
Next wsSheet
End Sub