Excel – VBA Code for selecting multiple sheets

This code will select all sheets from the third sheet in [gs workbook] to the seventh in the same workbook.

Sub Test()
    Dim x As Integer
    ThisWorkbook.Worksheets(3).Select
    For x = 4 To ThisWorkbook.Worksheets.Count
        Worksheets(x).Select (False)
    Next x
End Sub

It sets the optional Replace argument to False so that the selection is extended.

Alternative

Sub FormatMySheets()

MyTotal = Sheets.Count


  
           For x = 3 To MyTotal
           Sheets(x).Select
          'Format your sheets here
           Next x
End Sub
SOURCE

LINK (Mrexcel.com)

LANGUAGE
ENGLISH