COLUMNWIDTH

Returns the column width of the active cell.
For instructions on how to add a function to a workbook refer to the page under Inserting Functions


'iColumnNo - The column number you want the width of

Public Function COLUMNWIDTH(Optional ByVal iColumnNo As Integer = -1) As Single

   If iColumnNo = -1 Then
      COLUMNWIDTH = ActiveCell.ColumnWidth
   Else
      COLUMNWIDTH = ActiveSheet.Columns(iColumnNo & ":" & iColumnNo).ColumnWidth
   End If
End Function


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext