How can I easily make cells in Excel that are square?

  • Thread starter Thread starter Guest
  • Start date Start date
:
... How can I easily make cells in Excel that are square?
Seems such a simple request, but I cannot find a simple answer.

Try the response by PaulB in this thread:
http://tinyurl.com/8ytqu
where he posts a sub MakeSquare for the purpose
(sub is pasted below for easy ref)

Steps
--------
Select the range (or try selecting entire sheet)
Run the sub by pressing Alt+F8,
select "MakeSquare" in the Macro dialog, click Run
Answer the inputbox by entering say: 0.1, 0.1
then click OK
When the sub completes, you'd get the result !

'----- sub posted by Paul B ---
Sub MakeSquare()
Application.ScreenUpdating = False
Dim WPChar As Double
Dim DInch As Double
Dim Temp As String

Temp = InputBox("Height and width in inches?")
DInch = Val(Temp)
If DInch > 0 And DInch < 2.5 Then
For Each c In ActiveWindow.RangeSelection.Columns
WPChar = c.Width / c.ColumnWidth
c.ColumnWidth = ((DInch * 72) / WPChar)
Next c
For Each r In ActiveWindow.RangeSelection.Rows
r.RowHeight = (DInch * 72)
Next r
End If
Application.ScreenUpdating = True
End Sub
'------------

---
 
select all;
format; row height set to 72 pts
column width set to 12 pts

displys cells 1" by 1"
 
If you can get your hands on a Mac, XL2004 by default allows you to set
row height and column width in inches/centimeters.
 
The underlying problem is that Excel measures Row Height in picas and Column
Width in number of standard characters.

There are 72 picas (vertical) to the inch, and 12 characters (horizontal) to
the inch. So for a square cell, the ratio of the NUMBERS for Row
Height/Column Width must be 1:6. As JEV wrote, for a 1 inch square cel,l set
RH = 72, CW =12.
For a 1/2 " square cell, set RH=36, CW=6.

Mike
 
MichaelRobert said:
The underlying problem is that Excel measures Row Height in picas and Column
Width in number of standard characters.

There are 72 picas (vertical) to the inch, and 12 characters (horizontal) to
the inch. So for a square cell, the ratio of the NUMBERS for Row
Height/Column Width must be 1:6. As JEV wrote, for a 1 inch square cel,l set
RH = 72, CW =12.
For a 1/2 " square cell, set RH=36, CW=6.

Mike

Depending on the reason you want square cells, you may want to create a
table in Word, where it's very easy to specify column height and row
width in inches or your default Windows measurement.

You can also search the Internet for either add-ins or macros to create
square cells in Excel.

Quattro Pro also makes it easy to create square cells in a spreadsheet.

Bill
 
In addition to this, if you want them to print exactly square, you will
need to print a sample and then adjust the Cell size to correct back to
a square.
 
In addition to Bob's addition.

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/index.php?d=envbawssetrowcol


Gord Dibben Excel MVP
 
Back
Top