View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Formula to display column widths?

Rob,

A small UDF

Function colwidth(rng As Range)
colwidth = rng.ColumnWidth
End Function

Call with =colwidth(A1) or whichever column you want.

If you want to convert to pixels you can have an approximation by
multiplying * 7.5 or if you'd like to do the maths yourself have a look here
for the correct way to convert. If you drag a column you can see the width in
Pixels in paretthesis.

http://groups.google.com/group/micro...b8cff?lnk=raot

Me, I'd stick with an approximation!!

Mike



"rob" wrote:

Could someone please suggest a formula which could display the width of a
column in pixels.

I have to produce tables to a specific width, and this would make formatting
them easier - I could avoid clicking on each column individually to check.