ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How wide is a font? (https://www.excelbanter.com/excel-discussion-misc-queries/68894-how-wide-font.html)

Rayo K

How wide is a font?
 
I am trying to make a field of square worksheet cells. I have reviewed the
message board and found the VBA code to make a certian cell be square, but I
want to make thousands of squares, and I want to leave the default height

Right now I can make one cell square, read it's width and height, calculate
the ratio, figure out what width equates to 12.75 height, select all columns,
and change the width...

....but I want to know how to determine the column width by simply
multiplying by digits/inch (i.e. the default font width). How do I do that?

Gord Dibben

How wide is a font?
 
Rayo

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.

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 Wed, 1 Feb 2006 15:41:27 -0800, Rayo K
wrote:

I am trying to make a field of square worksheet cells. I have reviewed the
message board and found the VBA code to make a certian cell be square, but I
want to make thousands of squares, and I want to leave the default height

Right now I can make one cell square, read it's width and height, calculate
the ratio, figure out what width equates to 12.75 height, select all columns,
and change the width...

...but I want to know how to determine the column width by simply
multiplying by digits/inch (i.e. the default font width). How do I do that?


Gord Dibben MS Excel MVP


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com