LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Formatting multiple sheets within workbook.

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open multiple workbook then combine into single workbook butdifferent sheets geniusideas Excel Programming 10 July 4th 12 04:45 AM
formatting sheets in a workbook SM_NCSW Excel Worksheet Functions 4 November 6th 08 10:03 PM
Automated multiple text files into multiple sheets in one workbook Dr Dan Excel Discussion (Misc queries) 14 November 4th 07 11:32 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
How do I copy print formatting to multiple sheets in a workbook? BFB@keystone Excel Discussion (Misc queries) 2 March 29th 06 01:34 AM


All times are GMT +1. The time now is 11:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"