Greetings,
I recorded a simple macro to adjust the column widths of my worksheet. However, when I run the macro ONLY column J:O are adjusted to the column width specified (D:J are sizing much smaller that I need.) Does anyone have ideas on what's happening? The macro is below:
Sub ColumnWidth()
'
' ColumnWidth Macro
'
'
Columns("D:D").Select
Range("D2").Activate
Selection.ColumnWidth = 58.57
Columns("E:E").Select
Range("E2").Activate
Selection.ColumnWidth = 26.86
Columns("F:F").Select
Range("F2").Activate
Selection.ColumnWidth = 24.14
Columns("G:G").Select
Range("G2").Activate
Selection.ColumnWidth = 36.57
Columns("H:H").Select
Range("H2").Activate
Selection.ColumnWidth = 16.14
Columns("I:I").Select
Range("I2").Activate
Selection.ColumnWidth = 23
Columns("J:J").Select
Range("J2").Activate
Selection.ColumnWidth = 15.14
Columns("K:K").Select
Range("K2").Activate
Selection.ColumnWidth = 17
Columns("L:L").Select
Range("L2").Activate
Selection.ColumnWidth = 16.71
Columns("M:M").Select
Range("M2").Activate
Selection.ColumnWidth = 16.43
Columns("N:N").Select
Selection.ColumnWidth = 15.43
Columns("O:O").Select
Selection.ColumnWidth = 21.57
End Sub
Thanks a bunch.
I recorded a simple macro to adjust the column widths of my worksheet. However, when I run the macro ONLY column J:O are adjusted to the column width specified (D:J are sizing much smaller that I need.) Does anyone have ideas on what's happening? The macro is below:
Sub ColumnWidth()
'
' ColumnWidth Macro
'
'
Columns("D:D").Select
Range("D2").Activate
Selection.ColumnWidth = 58.57
Columns("E:E").Select
Range("E2").Activate
Selection.ColumnWidth = 26.86
Columns("F:F").Select
Range("F2").Activate
Selection.ColumnWidth = 24.14
Columns("G:G").Select
Range("G2").Activate
Selection.ColumnWidth = 36.57
Columns("H:H").Select
Range("H2").Activate
Selection.ColumnWidth = 16.14
Columns("I:I").Select
Range("I2").Activate
Selection.ColumnWidth = 23
Columns("J:J").Select
Range("J2").Activate
Selection.ColumnWidth = 15.14
Columns("K:K").Select
Range("K2").Activate
Selection.ColumnWidth = 17
Columns("L:L").Select
Range("L2").Activate
Selection.ColumnWidth = 16.71
Columns("M:M").Select
Range("M2").Activate
Selection.ColumnWidth = 16.43
Columns("N:N").Select
Selection.ColumnWidth = 15.43
Columns("O:O").Select
Selection.ColumnWidth = 21.57
End Sub
Thanks a bunch.