Tom’s Tutorials For Excel: Displaying a Column’s Width
You can display a column’s width manually, or in a cell with a User-Defined Function. The first picture shows that when you press and hold your left mouse button between column headers, a column’s width appears in a tooltip. Column C is 16.43 (120 pixels) wide.
You can write a user-defined function (or copy this one) to return a column’s width in the cell, as seen in the next picture.
Public Function myWidth(iCol As Integer) As Double
myWidth = Columns(iCol).ColumnWidth
End Function
Leave a Reply