Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Formula to display column widths?

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Formula to display column widths?

Row heights are measured in points or pixels. There are 72 points to an inch
and "maybe" 96 pixels to the inch.

The number that appears in the Standard column width box is the average number
of digits 0-9 of the standard font that fit in a cell.

When dragging the column width you will see two numbers.........one is width as
above, the other is pixels.

For an interesting and enlightening discussion on this subject see

http://snipurl.com/dzz8

If you want to use VBA to set height and width in mm.

Ole Erlandson has code for setting row and column dimensions.

http://www.erlandsendata.no/english/...vbawssetrowcol


Gord Dibben Excel MVP

On Fri, 30 May 2008 20:17:00 -0700, 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
column widths eleeng Excel Discussion (Misc queries) 1 April 2nd 07 08:09 PM
Can I have different column widths below each other Dizzy Des New Users to Excel 3 February 8th 07 12:52 PM
Display Multiple Bar Widths Mike C Charts and Charting in Excel 1 June 14th 06 09:33 PM
Different column widths Holyhabanero Excel Worksheet Functions 2 January 18th 06 06:17 PM
Column Widths Alex Mackenzie Excel Worksheet Functions 0 October 20th 05 08:41 PM


All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"