# How to ignore sheet names



## hejstrup (Dec 22, 2022)

Hey.
Sub Format()
'
' Format Makro
'
' Genvejstast:Ctrl+f
'
    Sheets(Array(" 1410", " 1510", " 1610", " 1710", " 1810", " 1910", " 2010")).Select
    Sheets(" 2010").Activate
???how do i make my macro ignore the sheetnames, and run the macro on all sheets ???


----------



## offthelip (Dec 22, 2022)

Welcome to the forum, I think you need something like this:

```
Sub test()
shtnames = Array(" 1410", " 1510", " 1610", " 1710", " 1810", " 1910", " 2010")

For i = 0 To UBound(shtnames)
With Worksheets(shtnames(i))
 .Range("A1").Font.Name = "Arial"
End With
Next i


End Sub
```


----------

