top of page

You are learning Data Analysis and Visualization in MS Excel

How to create custom number formats for displaying data in a specific way (e.g., currency, percentages)?

Excel offers a powerful feature called custom number formats that allows you to display your data in a variety of ways beyond just basic numbers. Here's how you can create custom number formats:

1. Select the cells:
Choose the cells where you want to apply the custom format.

2. Open the Format Cells window:
There are two ways to do this:
- Right-click on the selected cells and choose "Format Cells" from the context menu.
- Go to the "Home" tab on the Excel ribbon. In the "Number" group, click the small arrow in the bottom right corner to launch the "Format Cells" window.

3. Navigate to the "Custom" format:
- In the "Format Cells" window, click on the "Category" tab.
- From the list, select "Custom."

4. Build your format code:
- The "Type" box displays the current format code. This is where you'll build your custom format using specific placeholders and codes.

Here's a breakdown of common elements you can use:

- Number placeholders:
- # : Displays a number (including zeros).
- 0: Displays a number or a zero if the value is zero.
- Decimal places:
- . : Separates the whole number from the decimal part.
- You can specify the number of decimal places displayed. (e.g., 00 indicates two decimal places)
- Text characters:
- Any text enclosed in quotation marks ("") will be displayed literally.
- Use this for symbols like currency signs ($, €), percent (%) etc.
- Color codes:
- Specific codes can be used to display negative values in red for example.

5. Examples of custom number formats:

- Currency:
To format a number as currency with two decimal places and a dollar sign: `"$0.00"`
- Percentage:
To display a number as a percentage with one decimal place: `0.0%`
- Custom text with numbers:
To display "Item" followed by a space and the number (rounded to no decimals): `"Item "0`

6. Preview and Apply:
- The "Sample" section shows you how your format will look based on the current value in the selected cell.
- Once you're happy with your format code, click "OK" to apply it to your selected cells.

Tips:

* Experiment with different codes to achieve the desired format.
* You can find more detailed information and examples of custom number formats in Excel's Help documentation or online resources.
* Remember, existing built-in formats like Currency or Percentage might already be sufficient for your needs. Explore those options before diving into custom formatting.

bottom of page