PDA

View Full Version : set collum widths in excel



Greven
05-07-2006, 10:18 PM
How do i set the width of a collum in Microsoft Excel (2002 I think) using millimeters or centimeters rather than number of characters?

johcar
06-07-2006, 10:37 AM
Not sure this is possible without the help of a macro...

See this (http://exceltips.vitalnews.com/Pages/T0201_Understanding_Column_Widths.html) for some background.

If you put the text "set column width" into the Excel Help (2003), one of the results is as follows:


"Measurement units and rulers in Excel

Unlike Microsoft Word, Excel does not provide a horizontal or vertical ruler, and there is no quick way to measure the width or height of a worksheet in inches. Excel uses characters, points, and pixels as units of measurement.

The width of cells is displayed in characters and pixels rather than in inches. When you drag the boundary of a column heading to adjust the width of a column on the worksheet, a ScreenTip displays the width in characters and shows pixels in parentheses.
The height of cells is displayed in points and pixels rather than in inches. When you drag the boundary of a row heading to adjust the height of a row on the worksheet, a ScreenTip displays the height in points and shows pixels in parentheses.
An approximate conversion of points and pixels to inches is shown in the following table.

Points -- Pixels -- Inches
18 ------ 24 ----- .25
36 ------ 48 ------ .5
72 ------ 96 ------ 1
108 ---- 144 ----- 1.5
144 -----192 ------2"

Since the widths are based on the font you use, the table may assist in creating a macro to set column widths based on linear measurement rather than font size... But as far as actually showing the measurement when resizing the column, I think M$ may need a "new feature request" ;) - it would make sense to make Excel more consistent with Word....

Good luck!!!!!

TeejayR
06-07-2006, 08:36 PM
I wrote this macro for creating forms for my printer

You may have to change it to fit the needs of your printer


Sub MeasuredColumnWidth()
ColumnCent = Application.InputBox("Enter Column Width in Centimetres", "Measured Columns")
NewColumnWidth = ColumnCent * 4.9
Selection.ColumnWidth = NewColumnWidth
End Sub