I have a script:
Sub wsPOT()
Dim wsPOT As Worksheet
Dim cel As Range
Dim lastrow As Long, lastrow2 As Long, fstcell As Long, i As Long, Er As Long, lstCol As Long, lstRow As Long
Set wsPOT = Sheets("PO Tracking")
With wsPOT
wsPOT.Range("Q1:U1").Copy
lastrow = wsPOT.Cells(Rows.Count, "B").End(xlUp).Row
wsPOT.Range("V1:X1").Copy wsPOT.Range("H3:J" & lastrow)
wsPOT.Range("N2:O2").Copy wsPOT.Range("N3:O" & lastrow)
wsPOT.Range("P1:V1").Copy
wsPOT.Range("B3:H" & lastrow).PasteSpecial xlPasteFormats
wsPOT.Range("K3:K" & lastrow).Borders.Weight = xlThin
lastrow = wsPOT.Cells(Rows.Count, "B").End(xlUp).Row
wsPOT.Range("H:J").Calculate
wsPOT.Range("B3:K" & lastrow).Sort key1:=Range("H3:H" & lastrow), order1:=xlAscending
lastrow2 = wsPOT.Cells(Rows.Count, "H").End(xlUp).Row
wsPOT.Range("B3:K" & lastrow2).Sort key1:=Range("H3:H" & lastrow2), order1:=xlDescending
End With
End Sub
This is meant to ultimately organize the sheet so that the the late jobs are on top, and then those are organized by oldest to youngest.
It seems not to work. What seems to happen is that the first orginization works fine, but then it seems to ignore the second criteria.
Attached is the sheet, with script.
https://dl.dropbox.com/u/3327208/Excel/Orga.xlsm
If someone can help look at this it be apprecaited.
Is this what you are trying?