Got the below code to work to sort a range of sheets based on a cell value that being date and time. As you can see the sheet range is

For lCount = Sheets("Works").Index + 1 To lShtLast

lShtLast = Sheets("TEMP").Index - 1

The code works a treat only the lords of the office have changed what they want

Now its the same sheet range however they now want that range of sheets and each sheet cell "B5" value to reference three lists on another sheet .Name "DU" in the same book.. and based on which list the cell value closely matches the tab colour for that sheet to change to match the lists title

Lists are "Sandwell" "Saltley" "Banbury"

Sheets matching Sandwell should go after "Index" and be .Tab.ColorIndex = 5

Sheets Matching Banbury Should go before "TEMP" and be .Tab.ColorIndex = 6

And Sheets matching Saltley should bo Between Sandwell and Saltley and be .Tab.ColorIndex = 43

All sheets are prefix PP*

Anyone willing to give some help and guidance on putting this together I'd be grateful !



Please Login or Register  to view this content.