I have a few basic macros, but I'd like to add a looping function to each. I'm looking for the starting code to kick of a loop and the ending code to close a loop on the last active worksheet.
Here is the current code:
Sub MQA_Shrink()
'
'
'
For Each sht In ThisWorkbook.Worksheets
Range("B:B,D:D,H:I,K:O").Select
Range("K1").Activate
Selection.Delete Shift:=xlToLeft
ActiveWindow.ScrollColumn = 1
Columns("B:F").Select
Columns("B:F").EntireColumn.AutoFit
Range("A1:F1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Next sht
End Sub
I'd just like this basic formatting macro to cycle through all the tabs and end.
I've mashed up different examples I've seen on here, but nothing seems to cycle through properly. They were all specifically tailored to the requester's project. Any advice?