Tom’s Tutorials For Excel: Displaying a Column’s Width

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.
TTFE0016a
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

TTFE0016b

Share Button
Posted in Tom's Tutorials for Excel
Tags: ,

Leave a Reply

Your email address will not be published.

*