View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Exact ratio of width to height to get a square cell?

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



"QG_RE" wrote:

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?