Anzeige


Transparenz: Um diesen Blog kostenlos anbieten zu können, nutzen wir Affiliate-Links. Klickst du darauf und kaufst etwas, bekommen wir eine kleine Vergütung. Der Preis bleibt für dich gleich. Win-Win!

Custom Formatting Excel – Number Format Codes Excel

Cell formatting is one of the most important core functions in Excel, with which we can make the background behind the pure numbers visible. In addition to the usual number formatting such as percent (%), currency (€/$), time (12:30), fractions (1/4) that most people know and have already used in everyday work, there is a whole range more of user-defined cell formatting and number formats that are already prepared in Excel for selection.

Benutzerdefinierte Formatierung Excel

Topic Overview

Anzeige

But often even these are not enough to display numerical values as required. For example, if you want to display a number of pallets or crates / cartons or other things in Excel in such a way that these numerical values can also be used for calculations, you will of course not find this in the existing user-defined number formatting.

The same applies to the automatic display of negative values (-1000) in a specific color. But that’s exactly why Excel offers the possibility to adapt the cell formatting to your own needs. In our little tutorial we would like to explain what the character sets (# | [] | E+ | % | ?) are all about and how you can use them. You can also find more information about cell formatting in Excel in our tutorial on conditional formatting in Excel.

Custom Formatting Excel – Number Format Codes Excel

Cell formatting is one of the most important core functions in Excel, with which we can make the background behind the pure numbers visible. In addition to the usual number formatting such as percent (%), currency (€/$), time (12:30), fractions (1/4) that most people know and have already used in everyday work, there is a whole range more of user-defined cell formatting and number formats that are already prepared in Excel for selection.

Benutzerdefinierte Formatierung Excel

Topic Overview

Anzeige

But often even these are not enough to display numerical values as required. For example, if you want to display a number of pallets or crates / cartons or other things in Excel in such a way that these numerical values can also be used for calculations, you will of course not find this in the existing user-defined number formatting.

The same applies to the automatic display of negative values (-1000) in a specific color. But that’s exactly why Excel offers the possibility to adapt the cell formatting to your own needs. In our little tutorial we would like to explain what the character sets (# | [] | E+ | % | ?) are all about and how you can use them. You can also find more information about cell formatting in Excel in our tutorial on conditional formatting in Excel.

What do the characters in custom formatting mean?

Custom formatting in Excel is accessed from the Home tab, then the Number menu section. There is usually the value “Standard” which contains a number of predefined number formattings that are used most frequently via a drop-down menu. The last item there is “further number formats” which takes you to the cell formatting area. Here you can set a lot more such as fonts, frames, color highlights.

Via “Additional number formats” you get to a dialog window in which “User-defined” is the last item. In the list that is then available for selection, it can be quite confusing what all the rhombuses, square brackets, question marks and semicolons mean and how they can be used.

see fig. (click to enlarge)

benutzerdefinierte formatierung Abb.1
Ads

Don’t get confused at this point, because the symbols shown are nothing more than placeholders for specific applications. You can accept it, but you don’t have to. You can also build your own use case from it, or adapt predefined formatting that is in the list (almost) arbitrarily. Below is a table of symbols and what they stand for:

Number format code meaning
# Placeholder for numbers that can be used to limit the number of zeros within a number to the significant number
“” For inserting text in combination with numbers (e.g. 100 “palettes”)
[] For defining text or numbers in a specific color (e.g. [red], [green], [blue])
= Condition for a numerical value that fulfills a condition (e.g. > than 1,000)
<> Less than and Greater than… (Can be combined with “=” e.g. >=1000
€, $, £, ¥ Currency formatting determines where the currency symbol appears, and it also determines the style and position of the thousands separator
E+, E-, e+, e- Scientific format for displaying the exponent. Number of zeros or “#” indicates the number of digits in the exponent. “E-” or “e-” (negative exponents) displays a minus sign, and “E+” and “+” (positive exponents) displays a plus sign
yy, dd, mm, ss, hh Formatting of time-based numerical values. This can be years, months, days, hours, minutes or seconds, which can be output in different ways (depending on the number of codes used). (Ex. Jan 14, 2022 = dd:mmmm:yyy or Jan 14, 2022 = dd:mm:yy)
? Used to display fractions (e.g. 5.25 = 5 1/4 = #?/?). The hash indicates the place for the whole number, and with ?/? specifies that the decimal places should be displayed as a fraction

What do the characters in custom formatting mean?

Custom formatting in Excel is accessed from the Home tab, then the Number menu section. There is usually the value “Standard” which contains a number of predefined number formattings that are used most frequently via a drop-down menu. The last item there is “further number formats” which takes you to the cell formatting area. Here you can set a lot more such as fonts, frames, color highlights.

Via “Additional number formats” you get to a dialog window in which “User-defined” is the last item. In the list that is then available for selection, it can be quite confusing what all the rhombuses, square brackets, question marks and semicolons mean and how they can be used.

see fig. (click to enlarge)

benutzerdefinierte formatierung Abb.1
Ads

Don’t get confused at this point, because the symbols shown are nothing more than placeholders for specific applications. You can accept it, but you don’t have to. You can also build your own use case from it, or adapt predefined formatting that is in the list (almost) arbitrarily. Below is a table of symbols and what they stand for:

Number format code meaning
# Placeholder for numbers that can be used to limit the number of zeros within a number to the significant number
“” For inserting text in combination with numbers (e.g. 100 “palettes”)
[] For defining text or numbers in a specific color (e.g. [red], [green], [blue])
= Condition for a numerical value that fulfills a condition (e.g. > than 1,000)
<> Less than and Greater than… (Can be combined with “=” e.g. >=1000
€, $, £, ¥ Currency formatting determines where the currency symbol appears, and it also determines the style and position of the thousands separator
E+, E-, e+, e- Scientific format for displaying the exponent. Number of zeros or “#” indicates the number of digits in the exponent. “E-” or “e-” (negative exponents) displays a minus sign, and “E+” and “+” (positive exponents) displays a plus sign
yy, dd, mm, ss, hh Formatting of time-based numerical values. This can be years, months, days, hours, minutes or seconds, which can be output in different ways (depending on the number of codes used). (Ex. Jan 14, 2022 = dd:mmmm:yyy or Jan 14, 2022 = dd:mm:yy)
? Used to display fractions (e.g. 5.25 = 5 1/4 = #?/?). The hash indicates the place for the whole number, and with ?/? specifies that the decimal places should be displayed as a fraction

Application examples of custom formatting

As already shown in the table, the numbers can be displayed as currency, fraction, and / or different decimal places and colors using the user-defined formatting in Excel. Times and dates can also be adjusted to the extent that Excel can calculate them. We have created an example table with different formatting, which we would like to use to explain some of the possibilities.

Note: This sample table can also be downloaded here for free >>>

In our table, we focus on a list of various current item stocks, as well as the reorder, minimum, and maximum stock levels of each item. In addition, the current acquisition prices, the maximum justifiable purchase prices, as well as sales prices per unit and the resulting positive and negative (loss) profit margins per unit.

The numbers in the “Current stock” column should be formatted in such a way that they automatically appear in red if the stock exceeds the maximum stock or falls below the minimum stock, and otherwise in blue font. In addition, there should not only be the pure number, but the additional information “piece” after the number. So that this works, let’s take a look at the first row of the table:

The stock is currently 71 pieces, the minimum stock is 25 pieces and the maximum stock is 70 pieces. The maximum stock has thus been exceeded and the number is displayed in red. To do this, we used the following custom formatting:

see fig. (click to enlarge)

[Red][>70] 0 “pieces”;[Red][<=25] 0 “pieces”;[Blue] 0 “pieces”

benutzerdefinierte formatierung Abb.2
Ads

Let’s break down our formatting into its individual parts for a better understanding:

1. [Red][>70] 0 “Piece” = The color value of the number is specified in the square brackets at the beginning, and in the second square bracket behind it we specify a condition for when this should be the case. Here the number should appear in red if the number is greater than 70. Next, we didn’t just want to have the pure number there, but the information “piece”. You can put text both before and after a number. So that Excel can calculate with it, you must ALWAYS put the text in “”!

2.;[Red][<=25] 0 “piece” = The first character we see is a semicolon. This is how we separate the sections within our conditional formatting code. You can use up to four sections within a format code, but you must always ensure that they are separated from one another with a semicolon so that the formatting works. So first we specify the color again, and then we specify the argument that this should be on condition that the number is less than or equal to 25.

3.;[Blue] 0 “Piece” = In the last section of our formatting, we specify that if none of the arguments mentioned above applies, the font should be blue, and of course our additional text “Piece”. If we left out the third section completely, Excel would only output the pure number in the default font color.

Note: In the screenshot above, you will have noticed that when you select cell C4, which says “71 pieces”, this information is not reflected in the formula bar. There is only the number 71. This is because by adding text in “” Excel can ignore this text and only look at the number. If we were to simply write 71 pieces into the cell without displaying this using formatting, Excel would treat the content of the cell as text. And you can’t calculate with text!

We hope that our little tutorial has given you a little more insight into custom formatting in Excel. And again, don’t be fooled by all the special characters that are already in the formatting options. You can use them, but you don’t have to. Now that you know what the characters mean, you can easily create your own custom formatting in Excel.

Tip: You can also find out more about cell formatting options in our tutorial on conditional formatting in Excel.
You can download the table that we used for this tutorial for free and try it out a bit.

Blogverzeichnis Bloggerei.de

Application examples of custom formatting

As already shown in the table, the numbers can be displayed as currency, fraction, and / or different decimal places and colors using the user-defined formatting in Excel. Times and dates can also be adjusted to the extent that Excel can calculate them. We have created an example table with different formatting, which we would like to use to explain some of the possibilities.

Note: This sample table can also be downloaded here for free >>>

In our table, we focus on a list of various current item stocks, as well as the reorder, minimum, and maximum stock levels of each item. In addition, the current acquisition prices, the maximum justifiable purchase prices, as well as sales prices per unit and the resulting positive and negative (loss) profit margins per unit.

The numbers in the “Current stock” column should be formatted in such a way that they automatically appear in red if the stock exceeds the maximum stock or falls below the minimum stock, and otherwise in blue font. In addition, there should not only be the pure number, but the additional information “piece” after the number. So that this works, let’s take a look at the first row of the table:

The stock is currently 71 pieces, the minimum stock is 25 pieces and the maximum stock is 70 pieces. The maximum stock has thus been exceeded and the number is displayed in red. To do this, we used the following custom formatting:

see fig. (click to enlarge)

[Red][>70] 0 “pieces”;[Red][<=25] 0 “pieces”;[Blue] 0 “pieces”

benutzerdefinierte formatierung Abb.2
Ads

Let’s break down our formatting into its individual parts for a better understanding:

1. [Red][>70] 0 “Piece” = The color value of the number is specified in the square brackets at the beginning, and in the second square bracket behind it we specify a condition for when this should be the case. Here the number should appear in red if the number is greater than 70. Next, we didn’t just want to have the pure number there, but the information “piece”. You can put text both before and after a number. So that Excel can calculate with it, you must ALWAYS put the text in “”!

2.;[Red][<=25] 0 “piece” = The first character we see is a semicolon. This is how we separate the sections within our conditional formatting code. You can use up to four sections within a format code, but you must always ensure that they are separated from one another with a semicolon so that the formatting works. So first we specify the color again, and then we specify the argument that this should be on condition that the number is less than or equal to 25.

3.;[Blue] 0 “Piece” = In the last section of our formatting, we specify that if none of the arguments mentioned above applies, the font should be blue, and of course our additional text “Piece”. If we left out the third section completely, Excel would only output the pure number in the default font color.

Note: In the screenshot above, you will have noticed that when you select cell C4, which says “71 pieces”, this information is not reflected in the formula bar. There is only the number 71. This is because by adding text in “” Excel can ignore this text and only look at the number. If we were to simply write 71 pieces into the cell without displaying this using formatting, Excel would treat the content of the cell as text. And you can’t calculate with text!

We hope that our little tutorial has given you a little more insight into custom formatting in Excel. And again, don’t be fooled by all the special characters that are already in the formatting options. You can use them, but you don’t have to. Now that you know what the characters mean, you can easily create your own custom formatting in Excel.

Tip: You can also find out more about cell formatting options in our tutorial on conditional formatting in Excel.
You can download the table that we used for this tutorial for free and try it out a bit.

Blogverzeichnis Bloggerei.de

Search for:

About the Author:

Michael W. SuhrDipl. Betriebswirt | Webdesign- und Beratung | Office Training
After 20 years in logistics, I turned my hobby, which has accompanied me since the mid-1980s, into a profession, and have been working as a freelancer in web design, web consulting and Microsoft Office since the beginning of 2015. On the side, I write articles for more digital competence in my blog as far as time allows.
Transparenz: Um diesen Blog kostenlos anbieten zu können, nutzen wir Affiliate-Links. Klickst du darauf und kaufst etwas, bekommen wir eine kleine Vergütung. Der Preis bleibt für dich gleich. Win-Win!

Search by category:

Search for:

About the Author:

Michael W. SuhrDipl. Betriebswirt | Webdesign- und Beratung | Office Training
After 20 years in logistics, I turned my hobby, which has accompanied me since the mid-1980s, into a profession, and have been working as a freelancer in web design, web consulting and Microsoft Office since the beginning of 2015. On the side, I write articles for more digital competence in my blog as far as time allows.
Transparenz: Um diesen Blog kostenlos anbieten zu können, nutzen wir Affiliate-Links. Klickst du darauf und kaufst etwas, bekommen wir eine kleine Vergütung. Der Preis bleibt für dich gleich. Win-Win!

Search by category:

Popular Posts:

2710, 2025

Dynamic ranges in Excel: OFFSET function

October 27th, 2025|Categories: Shorts & Tutorials, Microsoft Excel, Microsoft Office, Office 365|Tags: , |

The OFFSET function in Excel creates a flexible reference. Instead of fixing =SUM(B5:B7), the function finds the range itself, e.g., for the "last 3 months". Ideal for dynamic charts or dashboards that grow automatically.

2710, 2025

Mastering the INDIRECT function in Excel

October 27th, 2025|Categories: Shorts & Tutorials, Microsoft Excel, Microsoft Office, Office 365|Tags: , |

The INDIRECT function in Excel converts text into a real reference. Instead of manually typing =January!E10, use =INDIRECT(A2 & "!E10"), where A2 contains 'January'. This allows you to easily create dynamic summaries for multiple worksheets.

2310, 2025

From assistant to agent: Microsoft’s Copilot

October 23rd, 2025|Categories: Shorts & Tutorials, Artificial intelligence, AutoGPT, ChatGPT, Homeoffice, LLaMa, Microsoft Excel, Microsoft Office, Microsoft Outlook, Microsoft PowerPoint, Microsoft Teams, Microsoft Word, Office 365, TruthGPT, Windows 10/11/12|Tags: , , , |

Copilot is growing up: Microsoft's AI is no longer an assistant, but a proactive agent. With "Vision," it sees your Windows desktop; in M365, it analyzes data as a "Researcher"; and in GitHub, it autonomously corrects code. The biggest update yet.

2110, 2025

Windows 12: Where is it? The current status in October 2025

October 21st, 2025|Categories: Shorts & Tutorials, Homeoffice, Microsoft Office, Windows 10/11/12|Tags: , , |

Everyone was waiting for Windows 12 in October 2025, but it didn't arrive. Instead, Microsoft is focusing on Windows 11 25H2 and "Copilot+ PC" features. We'll explain: Is Windows 12 canceled, postponed, or is it already available as an AI update for Windows 11?

2010, 2025

Blocking websites on Windows using the hosts file

October 20th, 2025|Categories: Shorts & Tutorials, Homeoffice, Microsoft Office, Windows 10/11/12|Tags: , , , |

Want to block unwanted websites in Windows? You can do it without extra software using the hosts file. We'll show you how to edit the file as an administrator and redirect domains like example.de to 127.0.0.1. This will block them immediately in all browsers.

2010, 2025

The “Zero Inbox” method with Outlook: How to permanently get your mailbox under control.

October 20th, 2025|Categories: Shorts & Tutorials, Data Protection, Homeoffice, Microsoft Office, Microsoft Outlook, Office 365, Windows 10/11/12|Tags: , , , |

Caught red-handed? Your Outlook inbox has 1000+ emails? That's pure stress. Stop the email deluge with the "Zero Inbox" method. We'll show you how to clean up your inbox and regain control using Quick Steps and rules.

Offers 2024: Word & Excel Templates

Popular Posts:

2710, 2025

Dynamic ranges in Excel: OFFSET function

October 27th, 2025|Categories: Shorts & Tutorials, Microsoft Excel, Microsoft Office, Office 365|Tags: , |

The OFFSET function in Excel creates a flexible reference. Instead of fixing =SUM(B5:B7), the function finds the range itself, e.g., for the "last 3 months". Ideal for dynamic charts or dashboards that grow automatically.

2710, 2025

Mastering the INDIRECT function in Excel

October 27th, 2025|Categories: Shorts & Tutorials, Microsoft Excel, Microsoft Office, Office 365|Tags: , |

The INDIRECT function in Excel converts text into a real reference. Instead of manually typing =January!E10, use =INDIRECT(A2 & "!E10"), where A2 contains 'January'. This allows you to easily create dynamic summaries for multiple worksheets.

2310, 2025

From assistant to agent: Microsoft’s Copilot

October 23rd, 2025|Categories: Shorts & Tutorials, Artificial intelligence, AutoGPT, ChatGPT, Homeoffice, LLaMa, Microsoft Excel, Microsoft Office, Microsoft Outlook, Microsoft PowerPoint, Microsoft Teams, Microsoft Word, Office 365, TruthGPT, Windows 10/11/12|Tags: , , , |

Copilot is growing up: Microsoft's AI is no longer an assistant, but a proactive agent. With "Vision," it sees your Windows desktop; in M365, it analyzes data as a "Researcher"; and in GitHub, it autonomously corrects code. The biggest update yet.

2110, 2025

Windows 12: Where is it? The current status in October 2025

October 21st, 2025|Categories: Shorts & Tutorials, Homeoffice, Microsoft Office, Windows 10/11/12|Tags: , , |

Everyone was waiting for Windows 12 in October 2025, but it didn't arrive. Instead, Microsoft is focusing on Windows 11 25H2 and "Copilot+ PC" features. We'll explain: Is Windows 12 canceled, postponed, or is it already available as an AI update for Windows 11?

2010, 2025

Blocking websites on Windows using the hosts file

October 20th, 2025|Categories: Shorts & Tutorials, Homeoffice, Microsoft Office, Windows 10/11/12|Tags: , , , |

Want to block unwanted websites in Windows? You can do it without extra software using the hosts file. We'll show you how to edit the file as an administrator and redirect domains like example.de to 127.0.0.1. This will block them immediately in all browsers.

2010, 2025

The “Zero Inbox” method with Outlook: How to permanently get your mailbox under control.

October 20th, 2025|Categories: Shorts & Tutorials, Data Protection, Homeoffice, Microsoft Office, Microsoft Outlook, Office 365, Windows 10/11/12|Tags: , , , |

Caught red-handed? Your Outlook inbox has 1000+ emails? That's pure stress. Stop the email deluge with the "Zero Inbox" method. We'll show you how to clean up your inbox and regain control using Quick Steps and rules.

Offers 2024: Word & Excel Templates

Ads

Popular Posts:

Search by category:

Autumn Specials:

Anzeige
Go to Top