메인 컨텐츠로 가기

Excel에서 셀 크기를 cm (센티미터)로 설정하는 방법은 무엇입니까?

워크 시트에서 행 높이 및 열 너비의 기본 단위는 미리 설정되어 있으며 기본 열 너비는 8.38 자이고 기본 행 높이는 12.75 포인트입니다. 그리고 Excel에서는 행 높이 또는 열 너비를 인치 또는 센티미터로 설정하기가 어렵습니다. 그러나 때로는 어떤 목적으로 높이와 너비를 센티미터로 변경해야합니다. 이 문제를 어떻게 해결할 수 있습니까?

VBA 코드로 셀 크기를 cm (센티미터)로 설정

Excel 용 Kutools를 사용하여 cm (센티미터) 단위로 셀 크기 설정좋은 생각 3


화살표 블루 오른쪽 거품 VBA 코드로 셀 크기를 cm (센티미터)로 설정

VBA 코드를 사용하는 경우를 제외하고는 Excel의 기능을 사용하여 높이와 너비를 센티미터 단위로 설정할 수 없습니다. 아래 두 코드는 열 너비와 행 높이를 설정하는 데 도움이 될 수 있습니다. 다음과 같이하십시오.

1. 센티미터 단위로 설정할 셀을 선택합니다.

2. 클릭 개발자 > Visual Basic을새를 애플리케이션 용 Microsoft Visual Basic 창이 표시되면 끼워 넣다 > 모듈을 클릭하고 모듈에 다음 코드를 입력합니다.

행 높이를 센티미터로 설정하는 코드 :

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. 그런 다음 문서 곱하기 계산 3 버튼을 눌러 코드를 실행합니다. 그리고 행 높이를 입력하라는 메시지 상자가 나타납니다. 스크린 샷보기 :

문서 세트 셀 크기 cm1

주의 사항: 입력하는 숫자는 15보다 작아야합니다.이 대화 상자에 0을 입력해도이 VBA 코드는 행 높이를 변경하지 않습니다.

4. 클릭 OK. 그리고 선택한 셀의 행 높이는 2cm로 설정되었습니다. 스크린 샷보기 :

문서 세트 셀 크기 cm2 -2 문서 세트 셀 크기 cm3

열 너비도 센티미터로 설정하려면 다음 코드를 입력하면됩니다.

열 너비를 센티미터로 설정하는 코드 :

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

화살표 블루 오른쪽 거품 Excel 용 Kutools를 사용하여 cm (센티미터) 단위로 셀 크기 설정

위의 코드로 셀 크기를 센티미터로만 설정할 수 있습니다. 오늘은 다기능 도구를 소개하겠습니다. Excel 용 Kutools 셀 크기를 센티미터로 설정할 수있을뿐만 아니라 인치, 파운드 및 픽셀로도 설정할 수 있습니다.

Excel 용 Kutools, 이상과 300 편리한 기능으로 작업이 더 쉬워집니다. 

설치 후 Excel 용 Kutools는 다음과 같이하십시오.(지금 Excel 용 Kutools 무료 다운로드!)

1. 센티미터 단위로 설정하려는 셀을 강조 표시합니다.

2. 클릭 Kutools > Format > Adjust Cell Size, 스크린 샷 참조 :

문서 세트 셀 크기 cm9

3. 에서 Adjust Cell Size 대화 상자에서 Unit type 당신은 필요하고 지정합니다 Row heightColumn widthSet values 부분. 스크린 샷보기 :

문서 세트 셀 크기 (cm 5)

4. 그런 다음 OK or 신청. 행 높이가 2cm이고 열 너비가 3cm 인 셀이 표시됩니다.

문서 세트 셀 크기 cm6


화살표 블루 오른쪽 거품 Excel 용 Kutools를 사용하여 cm (센티미터) 단위로 셀 크기 설정

Excel 용 Kutools : Excel에 있어야하는 300 개 이상의 기능, 여기에서 30 일 무료 평가판.

관련 기사 :

범위의 열 너비 및 행 높이 설정

Excel에서 여러 셀을 제곱하는 방법은 무엇입니까?

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (4)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you. I used your idea to compare ColumnWidth and Width, and it was very helpful. I did this function in Object Pascal and want to share it with you. Thanks. procedure ActiveCellColumnWidthInCentimeters(ExcelApp: Variant; CM: Double); var dColumnWidth, dWidth, points: Double; begin dColumnWidth := ExcelApp.ActiveCell.ColumnWidth; dWidth := ExcelApp.ActiveCell.Width; points := ExcelApp.CentimetersToPoints(CM); ExcelApp.ActiveCell.ColumnWidth := ((points * dColumnWidth) / dWidth); end;
This comment was minimized by the moderator on the site
Seems redundant. Just go into the regular column size dialogue and add "cm" after typing the size.
This comment was minimized by the moderator on the site
Needed this badly. Thank you so much!
This comment was minimized by the moderator on the site
Wow - that is awesome! I needed to set cells to print at a certain size. I have never been able to figure out how to do that before. Yay for VBA!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations