Custom number format conditions allow you to specify a different format based on the size of a number. In this tutorial we’ll look at the different ways we can use them, including some fun with emojis!
In the examples below I’ve used emojis with custom number formats to visualise temperatures. And instead of boring old grades like A, B, C etc. for student test scores, I’ve used hand signs. And for a more serious application, I’ve simply used scaling for millions and thousands.
Note: only Excel Online displays colour emojis. The Excel desktop app displays them in greyscale. Emojis are available in Excel 2010 onward.
How to Apply Custom Number Format Conditions and Emojis Video
Download Workbook
Enter your email address below to download the sample workbook.
Custom Number Format Conditions with Emojis
In the image below the emoji column (D) actually contains the test score numbers, as you can see in the formula bar. They’ve had a custom number format applied, which you can see in the Format column (E), that displays an emoji instead of the underlying value.
It formats values greater than 80 with the clapping hands and values greater than 50 with the ok sign, with the remaining values given the thumbs down.
We can have lots of fun with emojis, here’s another example using temperatures:
The temperatures idea came from a Twitter post by @benlcollins where he used them in <cough> Google Sheets </cough>, and it reminded me that we have emojis in Excel too.
The limitation is that only Excel Online shows them in their coloured glory. In the Excel desktop app they are greyscale, as you can see below:
Inserting Emojis in Excel
You can use the keyboard shortcut:
To bring up a list of emojis available in Excel:
Or you can get a full list of emojis here. To use these emojis in Excel you need to take the code after U+ in the Code column on that page, as shown below. For example, the face with sunglasses code is 1F60E:
And then use the function HEX2DEC to convert the hexadecimal code into decimal, and the UNICHAR function to convert the decimal code into an emoji like so:
Note: just like emojis, UNICHAR is only available in Excel 2010 onward.
Thanks to fellow MVP, Frederic Le Guen for his post on using Emojis in Excel.
Custom Number Format Conditions for Scaling
Ok, enough frivolities, we can also use custom number format conditions for serious work, like formatting values with different scaling. For example, here I have values ranging from millions to hundreds, with each scaled accordingly:
A single custom number format is used on the Sales values above, which is shown in the Format column of the image. Notice the conditions start with the largest number and reduce from there.
Now, I don’t recommend using them in scenarios where the scaling is mixed, like the PivotTable above, because this could slow down interpretation and make the values more difficult to compare.
However, in the chart example below it makes more sense because the different categories warrant different scaling and they only contain one format per category:
Custom Number Format Conditions Font Colours
We can also apply different colours based on a scale. This is typically used to colour code negative values in red, but we can also specify a scale. In the example below I’ve colour coded values less than 500 in red, then values less than or equal to 1000 in green, with the remaining values in orange:
Tip: take note of my criteria order; the first value is the smallest. If you wrote the custom number format with <=1000 first, see below, then the first two values (200 and 790) would be green.
[Color10][<=1000] #,##0; [Red][<500] #,##0 ; [Color46] #,##0
Note: if your system settings are UK English, replace 'color' with 'colour'.
You can get a complete list of colour codes here.
Custom Number Format Condition Limitations
You can only have 2 conditions in a custom number format with each condition separated by a semicolon. i.e. the first condition; the second condition; and then everything else.
If you require more conditions you can use Conditional Formatting to override the custom number formatting.
Remember, the Excel desktop app only shows emojis in greyscale and they are only available in Excel 2010 onward.
More Custom Number Formatting Ideas
Custom Number Format Guide – comprehensive guide to custom number formats available in Excel.
Charting variances with emojis!
Complete list of emoji codes – as shown in the video.
Chris van Zyl
Thanks very much for the clearly set out and useful information, Mynda. Quick comment: it seems that the custom formatting of colours can be sensitive to the regional settings:
I downloaded the sample (excel_custom_number_format_conditions.xlsx) to try out, and found that it didn’t work straight off; it was only after I changed, e.g. [Color 10] to [Colour 10] that the result was as expected. My machine language setting is English(UK)
Mynda Treacy
Ah, interesting, Chris! I have noticed recently that all my ribbon menus also have the UK spelling of words e.g. Analyse instead of Analyze etc. I’d say this is a recent change because this worked on my PC at the time of writing and now it doesn’t! Thanks for letting me know.
Lou
I have hit the limit of custom number formats in my workbook. I am sure some of my earlier creations are no longer used, but I don’t know which ones I can delete. Is there a comprehensive listing somewhere in the workbook that shows which cells have custom formats?
Mynda Treacy
Hi Lou,
That’s a great question. There’s no built in way to identify cells with custom number formats. You might be able to write some VBA that finds them, but I’m not sure. You can post your question on our Excel forum where someone might know.
Mynda
Shashank Saxena
Can we handle more than 3 conditions with Custom Formatting?
Eg. I want to show pi chart emoji for 0%, 25%, 50%, 75%, 100%?
I can do this with conditional formatting, but it is ugly. Is there any solution with custom formatting for this?
Mynda Treacy
Hi Shashank, you can use the built in pie chart conditional format from the icon sets, rather than a custom number format.
Andrea Javarauckas
For the life of me, I couldn’t find the UNICHAR function. I’m on Excel 2010. I finally found out, via MS Office Support, that this function is NOT available in Excel 2010. Just wanted to let you know.
Mynda Treacy
Hi Andrea, sorry about that. Like emojis, UNICHAR only came into Excel in the 2010 version. I’ll add UNICHAR to the note. Thanks, Mynda
Stephen Barker
Mynda
I hope you are well.
I just wanted to congratulate you on the noticeably increased quality of your YouTube videos. They have become clearer and more natural over time, perhaps with your increasing confidence. It adds further interest when you cover incidental points of detail, and in a couple of recent videos I have been impressed with the zooming and highlighting (with green boxes) of the key items – it just seems right, rather than pedestrian or obtrusive.
I already loved using Excel, but with Power Pivot and Power Query, it went up a whole new level in power, usability and, yes, fun! I have to be careful that I don’t become like the man with a hammer who views everything as a nail. The only downside is the need to work from pure data tables – which is where your video on unpivoting data was really good.
Kind Regards
Stephen Barker
Safety Assessment Engineer
Airspace, ATM & Aerodromes
Civil Aviation Authority
UK
Mynda Treacy
Hi Stephen, thanks for noticing and appreciating the improvements in my video editing skills 🙂 It’s great to know I’m on the right track. I appreciate you taking the time to share your feedback and kind words. Mynda