Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Garry & Claus
Just wanted to say thank you to both of you for your guidance. I decided to forego the Exclusion list and went with a table list. Ran it tonight at work and it went very well. Here is what I ended up with just in case anyone in the future may look at doing something similar. Sub Sheet_Magic() Dim rng, c Dim RSrng, rCell Dim sh As Worksheet With Application .ScreenUpdating = False .EnableEvents = False End With Set RSrng = Sheets("Route Summary").Range("A5:A43") For Each rCell In RSrng On Error Resume Next If Not rCell.Value Is Nothing Then Sheets("" & rCell).Activate On Error GoTo 0 With ActiveSheet Set rng = .Range("A10:O26") rng.Borders(xlEdgeBottom).LineStyle = xlNone rng.Sort key1:=.Range("F10"), order1:=xlAscending, Header:=xlYes For i = 11 To 26 If .Cells(i + 1, "A") < .Cells(i, "A") Then With .Range(.Cells(i, 1), .Cells(i, 14)) With .Borders(xlEdgeBottom) .LineStyle = xlDouble .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThick End With End With End If Next For i = 26 To 11 Step -1 If Len(.Cells(i, 1)) = 0 Then .Rows(i).Delete End If Next End With Next rCell With Application .ScreenUpdating = True .EnableEvents = True End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open multiple workbook then combine into single workbook butdifferent sheets | Excel Programming | |||
formatting sheets in a workbook | Excel Worksheet Functions | |||
Automated multiple text files into multiple sheets in one workbook | Excel Discussion (Misc queries) | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
How do I copy print formatting to multiple sheets in a workbook? | Excel Discussion (Misc queries) |