Even if you have no idea what is custom formatting, these tricks will help you win over some common formatting needs for your data
I will share with you 10 custom formatting codes that you need to copy in the custom formatting box
Make sure to select the cells that you want to format before you open the custom formatting box. Let’s start rolling the tricks.
1. Format numbers with preceding 0 (zero/s)
At times you need your numbers to appear like this
- Select the numbers
- In the custom formatting box type the code – 000
This code will have at the max 3 zeros and will show preceding zeros depending on a number for eg
- 7 (james bond) will appear as 007
- 10 will appear as 010
- and 110 will appear as 110
2. Disappear data
- Using the code – ;;; (3 semicolons) will not show the data in the cell.
- Although the data will still be there in the cell but not visible in the cell
You can use this trick to hide dummy data for charts or even fool around with your boss at times (Caution: I am just saying :D)
3. Convert Numbers in Indian Comma Format
- To display the numbers in Indian Comma Format use the code- [>=10000000]##\,##\,##\,##0;[>=100000] ##\,##\,##0;##,##0
- If you want to add a currency symbol (like Rs or INR) use the modified code- [>=10000000]”Rs” ##\,##\,##\,##0;[>=100000]”Rs” ##\,##\,##0;”Rs” ##,##0
4. Format the numbers like a switch (Yes/No, Hide/Display)
- Use the code- “Show”;;”Hide”
- This code will replace all 1 (positive numbers) with the word “Show” and 0 (zeros) with the word “Hide”
5. Covert into Total Hours
- To convert the numbers into total hours use the code- [H]
- Bonus Tip : To have total hours and minutes use the code- [H]:mm
- With the above code the number 4.02 will be displayed as 96:28
- and the number 1 will be displayed as 24:00
6. Convert into Total Minutes
- Just as the way we can convert into total hours we can convert into total mins as well, just use the code- [M]
- You can even have seconds after total hours by using the code- [M]:ss
7. Add a text after or before a number
- You can add a Text before or after the number by applying the above codes
- Once you get a hang of how it works, you can modify it to your need
8. Get Trailing Dots after the text
- This is an extremely useful trick for creating forms
- Use the code- @*.
- This code will add trailing dots after the text for the remaining cell width
9. Covert Large Numbers into thousands or million format
- For converting the numbers into thousand use the code- 0.0, “k”
- For converting the numbers into million use the code- 0.0,, “Mn”
- Applying a comma (,) after the 0 means dividing the number by 1000, similarly applying 2 commas means dividing by 10 ^ 6 (1,000,000)
- This is an extremely good way to trim your numbers to shorter format without actually affecting the number
10. Custom Formatting also works for Charts
Let’s say that I want to format the axis in a thousands format
- Select the axis
- Press Ctrl + 1 to open the format axis box
- Under the Number Category
- Go in the Format Code box and type your code- 0, “K”
- Click on Add and Boom! the axis will be in thousand format
11. Bonus Tip : Color to your negative numbers in Red
- To add a color to let’s say negative numbers use the code- 0;[Red]-0
- The beauty about this trick is that you can customize red to what ever color your want
All you need to know is the Color Index Table
Here are a couple of things that you should keep in mind
- Colors are always written in square brackets [ ] and at the start of the code
- Color names are only applicable to the standard 8 colors rest follow the color index number. Black is a default color
- The case does not matter [red] = [Red] = [RED] (all are same)
- Download an Excel file containing the Color Index Table
So let’s say that you don’t want red but want maroon for negative numbers. Write the code this way 0;[color 9]-0
Which trick/s did you find the most interesting ?
- Do you have some tricks up your sleeve ?
- Which tricks have you found useful enough and how are you going to apply to your data?
Put down your thoughts and questions in the comments
Other Custom Formatting / Formatting Tricks
- Learn Custom Formatting from Scratch
- 4 Interesting Date Custom Formats
- Beauty Tips for your Excel Reports