Microsoft로 로그인
로그인하거나 계정을 만듭니다.
안녕하세요.
다른 계정을 선택합니다.
계정이 여러 개 있음
로그인할 계정을 선택합니다.
영어
죄송합니다. 이 문서는 귀하의 언어로 사용할 수 없습니다.

Summary

In Microsoft Excel, you can use either of two methods for using a custom number format to display leading zeros. Use one method for fixed-length numbers and use the other method for variable-length numbers.

Method 1: Fixed-length Numbers


When you want to display leading zeros for a fixed-length number, create a custom format with the same number of zeros (0) as digits that you want to display. For example, if you want to display a fixed-length number with five digits, create a custom number format with five zeros.


Example 1:


Use the 00000 format to display a number with five digits. When you use this format, the numbers that you type and the numbers that Microsoft Excel displays are listed in the following table.

Typed number Displayed number
--------------------------------
28217 28217
1234 01234
Example 2:


Use the 00000-0000 format when you want the number to appear as five digits followed by a hyphen and four more digits. When you use this format, the numbers that you type and the numbers that Microsoft Excel displays are listed in the following table.


Typed number Displayed number
--------------------------------
8217 00000-8217
82170000 08217-0000

Method 2: Variable-length Numbers


When you want to display leading zeros for variable-length numbers, create a custom format with the same number of zeros (0) (in quotation marks) as leading zeros that you want to display, followed by the number sign (#). For example, if you want to format a variable-length number with three leading zeros, create the following custom number format:

"000"#
Example 1:


Use the "0"# format when you want to display one leading zero. When you use this format, the numbers that you type and the numbers that Microsoft Excel displays are listed in the following table.


Typed number Displayed number
--------------------------------
123 0123
45 045
Example 2:


Use the "000"# format when you want to display three leading zeros. When you use this format, the numbers that you type and the numbers that Excel displays are listed in the following table.

Typed number Displayed number
--------------------------------
123 000123
45 00045

More Information

To create a custom number format, follow these steps for all versions of Excel:

  1. Right Click in a cell, click Format Cells

  2. lick Custom.

  3. In the Type box, type the custom format.

  4. Click OK.

도움이 더 필요하세요?

더 많은 옵션을 원하세요?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

이 정보가 유용한가요?

사용 경험에 어떠한 영향을 주었나요?
제출을 누르면 피드백이 Microsoft 제품과 서비스를 개선하는 데 사용됩니다. IT 관리자는 이 데이터를 수집할 수 있습니다. 개인정보처리방침

의견 주셔서 감사합니다!

×