I troll for posts no one else wants to touch: 2+ weeks and 0 replies...
you should be able to sort your current list A to Z on the po column, and then replace the button code with this updated version:
'only run via clicking on the new po button
Private Sub NewPO_Bttn_Click()
Dim ws As Worksheet
Application.ScreenUpdating = False
Template.Visible = xlSheetVisible
Template.Copy After:=PO_Log
Template.Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
Set ws = Worksheets(" (template) (2)")
Dim NextPO As Long: NextPO = WorksheetFunction.Min(PO_Log.Columns(POcol)) - 1
Dim NextPOrow As Long ': NextPOrow = PO_Log.Cells(PO_Log.Rows.Count, POcol).End(xlUp).Offset(1, 0).Row
Application.CutCopyMode = False
PO_Log.Rows(3).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
NextPOrow = 3
Dim NextPOhl As String: NextPOhl = "HL_" & Abs(NextPO)
'Build worksheet from the template
On Error GoTo IncPO
ws.Name = Replace(Template.Name, "template", Abs(NextPO))
On Error GoTo 0
ws.Range("A3").Name = NextPOhl
ws.Hyperlinks.Add _
Anchor:=ws.Range("A3"), Address:="", _
SubAddress:=NavHL, TextToDisplay:=NavHLtxt
'Log It
PO_Log.Cells(NextPOrow, JobsiteCOL).Value = "=SUBSTITUTE('" & ws.Name & "'!I4,""-"","""")*1"
PO_Log.Hyperlinks.Add _
Anchor:=PO_Log.Cells(NextPOrow, POcol), Address:="", _
SubAddress:=NextPOhl, TextToDisplay:=ws.Name
PO_Log.Cells(NextPOrow, RegionCOL).Formula = "='" & ws.Name & "'!C4"
PO_Log.Cells(NextPOrow, SellerCOL).Formula = "='" & ws.Name & "'!B7"
PO_Log.Cells(NextPOrow, DescCOL).Formula = "='" & ws.Name & "'!E17"
PO_Log.Cells(NextPOrow, RequiredDteCOL).Formula = "=IF(ISBLANK('" & ws.Name & "'!C13),"""",'" & ws.Name & "'!C13)"
PO_Log.Cells(NextPOrow, RequestedDteCOL).Formula = "=IF(ISBLANK('" & ws.Name & "'!G13),"""",'" & ws.Name & "'!G13)"
PO_Log.Cells(NextPOrow, AmountCOL).Formula = "=IF(ISBLANK('" & ws.Name & "'!J83),"""",'" & ws.Name & "'!J83)"
PO_Log.Cells(NextPOrow, CompCOL).Formula = "=IF(ISBLANK('" & ws.Name & "'!N83),"""",'" & ws.Name & "'!N83)"
EOSb: Exit Sub
IncPO:
NextPO = NextPO - 1
Resume
End Sub
Bookmarks