Excel cell default measure unit
Asked Answered
H

4

7

What is the default measurement unit of Excel cell size? Is it Point or Pixel or Millimeter ?

By default, excel cell Row height is 15, what is the meaning of this value? Is it 15 Pixels or 15 Points

By default, excel cell Column Width is 8.43, what is the meaning of this value? Is it 8.43 Pixels or 8.43 Points

If both row and column units are same, then Row height should be smaller than to column width. But the measurement is reverse, row height shows bigger number than column width. In Cell appearance also, row is small than column width.

enter image description here

I need to create box with Height 90 mm (millimeter) and Width 195 mm (millimeter). Please let me know what are values to be put in Row and Column textboxes.

Thanks in advance.

Hames answered 17/11, 2017 at 7:56 Comment(0)
M
6

The default units for column and row are indeed different when accessed through the GUI.

The displayed column width in the GUI refers to the Range.ColumnWidth property, where One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used (source). This means as you change the worksheet style, your column width may change too.

The height, however, displays a normal height in points.

In VBA, you can both get both this font-related unit, and the normal point unit for the width. For the height, you can only get the value in points:

Debug.Print Range("A1").ColumnWidth '8.43 characters wide by default
Debug.Print Range("A1").Width '48 points wide by default
Debug.Print Range("A1").Height '12.75 points high by default

Of course, you can calculate a conversion factor between character width and points: Range("A1").Width / Range("A1").ColumnWidth = 5.69 when using Arial, 10 pt. This means that if you want to have a size of 195mm by 90mm, you need to enter 97.0777 as column width, and 255.118 as column height if you're using Arial, 10 pt as normal style.

Moppet answered 17/11, 2017 at 9:30 Comment(1)
Thanks all guys, I understood the concept and it is working perfectlyHames
P
2

As per the Microsoft documentation....

You can specify a row height of 0 (zero) to 409. This value represents the height measurement in points (1 point equals approximately 1/72 inch or 0.035 cm). The default row height is 12.75 points (approximately 1/6 inch or 0.4 cm). If a row has a height of 0 (zero), the row is hidden.

Read it more here.

Pasahow answered 17/11, 2017 at 8:13 Comment(0)
S
2

You can change and define this unit manually where pointed in above link:

On the File tab, click Options, click the Advanced category, and under Display, select an option from the Ruler Units list.

Above you asked are the pixel width retranslated into character units (based on the Normal font) for display.

Scoop answered 17/11, 2017 at 8:15 Comment(0)
C
0

I went into similar problem: by generating Excel-xp compatible XML worksheet I found that ss:Width="100" inside <Column> tag gave me value 18.43 regardless the Display/Unit chosen. The correct unit are shown just if the "Page view" is present (38.1 mm). I tried to get some overview, hence set some values of ss:Width="x" and got values of Excel width. The function is not strictly linear (why) and can be computed

as: y[eu]=0.1906014x -0.579009091 for Excel unit,

or: y[mm]=0.3792x +0.26091 (approximately)

If this would be helpful.

Casiano answered 9/7 at 12:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.