You can shorten the above code to this...
Code:
Sub ExcelFox()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
If wks.Name Like "*[PS]" Then wks.Range("G9:J" & wks.Cells(Rows.Count, "A").End( _
xlUp).Row) = Array(Abs(wks.Name Like "*P"), "Minutes", -4431, #1/1/2013#)
Next
End Sub
Note: I wrapped the long line of code using the line continuation character for neatness of display, but you can unwrap that line if you want.
Bookmarks