Exact ratio of width to height to get a square cell?

Q

QG_RE

What is the exact ratio of column width to row height to get an exact square
on printout with default margins and standard A4 paper?
 
M

Mike H

Hi,

For a reason that was probably perfectly reasonable to Microsoft they use
different units of measure for column width (No of Characters in Courier 10)
and row height (Points)

A ratio of around 6.64/1 (H -W) will give you a pretty god square but you
can do it with a macro

right click the sheet tab, view code and paste this in. Select the cells you
want square and run it

Sub SqCells()
Inches = Val(InputBox("Height - width in inches?"))
If Inches > 0 And Inches < 2.5 Then
For Each c In Selection
myval = c.Width / c.ColumnWidth
c.ColumnWidth = ((Inches * 72) / myval)
Next c
For Each r In Selection
r.RowHeight = (Inches * 72)
Next r
End If
End Sub

Mike
 
G

Gord Dibben

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.

You can also measure column widths in 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 which you can convert to
inches.

Ole Erlandson has code for setting row and column dimensions.

http://www.erlandsendata.no/english/index.php?d=envbawssetrowcol


Gord Dibben Excel MVP
 
B

Bill Sharpe

QG_RE said:
What is the exact ratio of column width to row height to get an exact square
on printout with default margins and standard A4 paper?
It's too bad that Quattro Pro has fallen into disuse. It is very easy to
set row height and column width in the same units with that program. QP
has also had 1,000,000 rows available for several years now.

Of course, there are other factors involved in which spreadsheet program
you may want to or be able to use.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top