Home > Net >  How to set column formatting using a macro
How to set column formatting using a macro

Time:09-07

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.

CodePudding user response:

Example for column B (column index 2)

Sub doColumns()

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

End Sub
  • Related