How to set column formatting using a macro

Viewed 37

How to set column formatting using a macro? I need to set font size to 11 and text position to center. To make this formatting work automatically in an Excel sheet.

1 Answers

Example for column B (column index 2)

Sub doColumns()

Columns(2).Font.Size = 11
Columns(2).HorizontalAlignment = xlCenter

End Sub
Related