KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to set cell size in cm (centimeters) in Excel?

AuthorXiaoyangLast modified

When working with Excel worksheets, the default settings use character width for columns and points for row heights. Specifically, the default column width is 8.38 characters and the default row height is 12.75 points, which are not direct measurements in centimeters. This default can present challenges when you need to format tables, create printed reports, or design layouts where precise measurements in centimeters are required, particularly to meet specific printing or presentation standards. Excel does not provide a built-in way to set cell dimensions directly in centimeters - which often leads users to look for practical workarounds. Below, you’ll find solutions to easily adjust your cell sizes to centimeters, choosing the most suitable approach for your needs.

Set cell size in cm (centimeters) with VBA code

Set cell size in cm (centimeters) with Kutools for Excel good idea

Alternative solution: Convert centimeters to Excel row height and column width values


arrow blue right bubble Set cell size in cm (centimeters) with VBA code

There is no direct function in Excel for specifying cell size in centimeters, but you can achieve this through custom VBA code. This method is especially useful if you frequently need to set precise dimensions for worksheets being printed or shared in standardized formats. The following codes allow you to set either the row height or the column width in centimeters. Please follow these instructions carefully:

1. Begin by highlighting the range of cells for which you want to set the size in centimeters. You may select rows or columns depending on which measurement you wish to adjust.

2. Go to the Developer tab in your Excel ribbon and click Visual Basic to open the Microsoft Visual Basic for Applications editor. (If the Developer tab isn’t visible, see this guide: Show the Developer tab in Excel.) Then click Insert > Module to create a new module. Paste the following code into the newly created module:

Code for setting row height in centimeters:

Sub RowHeightInCentimeters()
Dim cm As Single
cm = Application.InputBox("Enter Row Height in Centimeters", _
"Row Height (cm)", Type:=1)
If cm Then
Selection.RowHeight = Application.CentimetersToPoints(cm)
End If
End Sub

3. To run this code, click the Run button button in the VBA editor toolbar, or press F5. You should see a prompt window asking you to enter the desired row height in centimeters. For visual reference, see the screenshot below:

Dialog for entering row height

Tips and notes: Enter a numeric value less than 15, as larger numbers may exceed the row height limitation of Excel and might not be visually practical for most sheets. If you enter 0, the row height will remain unchanged. Always check your selected range before applying the script to avoid modifying unintended cells.

4. Click OK to confirm your input. The row heights for all selected cells will now be adjusted to your specified value in centimeters. Below you’ll see a comparison of cells before and after this operation:

Cells of original row heightArrowCells of adjusted row height

If you wish to set the column width in centimeters instead, you may use the following VBA code. This is particularly helpful when creating forms or tables that must align perfectly with printed layouts:

Code for setting column width in centimeters:

Sub ColumnWidthInCentimeters()
Dim cm As Single, points As Integer, savewidth As Integer
Dim lowerwidth As Integer, upwidth As Integer, curwidth As Integer
Dim Count As Integer
Application.ScreenUpdating = False
cm = Application.InputBox("Enter Column Width in Centimeters", _
"Column Width (cm)", Type:=1)
If cm = False Then Exit Sub
points = Application.CentimetersToPoints(cm)
savewidth = ActiveCell.ColumnWidth
ActiveCell.ColumnWidth = 255
If points > ActiveCell.Width Then
MsgBox "Width of " & cm & " is too large." & Chr(10) & _
"The maximum value is " & _
Format(ActiveCell.Width / 28.3464566929134, _
"0.00"), vbOKOnly + vbExclamation, "Width Error"
ActiveCell.ColumnWidth = savewidth
Exit Sub
End If
lowerwidth = 0
upwidth = 255
ActiveCell.ColumnWidth = 127.5
curwidth = ActiveCell.ColumnWidth
Count = 0
While (ActiveCell.Width <> points) And (Count < 20)
If ActiveCell.Width < points Then
lowerwidth = curwidth
Selection.ColumnWidth = (curwidth + upwidth) / 2
Else
upwidth = curwidth
Selection.ColumnWidth = (curwidth + lowerwidth) / 2
End If
curwidth = ActiveCell.ColumnWidth
Count = Count + 1
Wend
End Sub

Advantages: The VBA approach allows exact measurements and batch changes, especially useful when formatting multiple cells at once across large datasets. However, a slight disadvantage is the initial learning curve if you are new to VBA, and this method might not be ideal for quick, one-time changes. In such cases, you can move on to the next method using Kutools for Excel for a more user-friendly solution.

Troubleshooting and suggestions: If the code fails to run, make sure macros are enabled in your Excel environment and your selected cell range is appropriate. Remember, always save your work before running VBA scripts to avoid unintended changes. If you encounter an error, double-check that you pasted the code into a module and not elsewhere, and restart Excel if issues persist.


arrow blue right bubble Set cell size in cm (centimeters) with Kutools for Excel

In comparison to the VBA method above, using the Kutools for Excel add-in offers a more intuitive and versatile solution. Kutools for Excel enables you to set cell size not only in centimeters, but also in other units such as inches, pounds, and pixels, all without writing any code. This method is especially useful for users who seek a visual, menu-driven interface and need to quickly change cell dimensions for different types of data presentation or document requirements.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

To begin using this method, install Kutools for Excel if you have not done so already. It can be downloaded and added directly to your Excel environment, making these features accessible right from the ribbon. (Free Download Kutools for Excel Now!)

1. Start by selecting the cells you want to resize in centimeters.

2. Go to the Kutools tab on the Excel ribbon, then click Format >Adjust Cell Size.

Adjust Cell Size option on the Kutools tab on the ribbon

3. In the Adjust Cell Size dialog box that appears, select "Centimeter" from the Unit type dropdown. Input your desired values for Row height and Column width in the Set values section.

Adjust Cell Size dialog box

4. Click OK or Apply to confirm. Your selected cells will instantly be resized - for example, a row height of 2 centimeters and column width of 3 centimeters. This process is fast and does not require additional scripting.

Cell size ajusted

Pros and cautions: Kutools’ visual interface simplifies cell size adjustments, making it ideal for users who prefer graphical tools over coding. It’s flexible and offers additional unit options for a variety of formatting needs. The main consideration is that Kutools for Excel is an add-in, so make sure it’s installed and activated properly.

Tip: After setting cell sizes, preview your worksheet before printing to ensure that scaling hasn’t affected the layout, especially if you combine centimeter settings with Excel's print area or zoom features.

Demo: Set cell size in cm (centimeters) with Kutools for Excel

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy AI-powered features for smarter and faster work! Download Now!

Convert centimeters to Excel row height and column width values

While Excel does not support setting row height or column width in centimeters directly with formulas, you can estimate the size by converting centimeters to points (for row height) or character width (for columns). This is useful if you need a quick approximation and don't wish to use VBA or add-ins.

For row height:

Since 1 centimeter is approximately 28.35 points, you can enter the following formula in an empty cell to calculate equivalent points:

=A1*28.35

Here, A1 contains your desired centimeter value (e.g.,2). After calculating, manually enter the result into the Row Height dialog (Home > Format > Row Height).

For column width:

Column width in Excel is based on the width of the number "0" in the default font. To roughly estimate column width for centimeters, use this formula (approximate, since it varies by font and DPI):

=A1*3.78

A1 is your centimeter value. Take the result and input it in the Column Width dialog (Home > Format > Column Width). This approach is approximate and may give slightly different results depending on font settings.

Note: These conversions are close estimates. Always preview the layout before printing or exporting for final use.


Related articles:

Set column width and row height for a range

How to square multiple cells in Excel?

Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in