View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Paul Paul is offline
external usenet poster
 
Posts: 661
Default how do you insert into a excel cell the column width automatic

Hi, I am not very macro efficient. Can you advise how I set it up and
include it as a tool bar button.

Thanks

"Jim Rech" wrote:

This formula returns the column width of the cell it is in: =CELL("width")

It rounds to the nearest integer however. If you wanted something more
exact you'd have to use a macro. If you put this in a standard module:

Function ColWidth()
Application.Volatile
ColWidth = Application.ThisCell.ColumnWidth
End Function

Then you can enter =ColWidth() in a cell.

--
Jim
"Paul" wrote in message
...
| How do you insert into a excel cell automatically the column width?