Are you looking for a way to visually round up or down your numerical values without changing the underlying cell value? While there are limitations, you can accomplish this by utilizing a Custom Number Formatting rule. The only caveat is you have to choose to either handle positive numbers or negative numbers. There is no way around this if you need to use a custom number format rule to change the cell’s appearance.
In this article, I’ll walk you through both the rule to tackle positive numbers and the rule to tackle negative numbers. Finally, I’ll show you how to modify the rule logic to handle larger numbers such as rounding numbers to the nearest millions. Enjoy!
Round To Nearest Thousands (Positive Only)
Custom Number Format:
Format Rule: [<=500]0,;#,###,",000"
How It Works:
• [<=500]0,
The first part of the rule tests if the number is less than or equal to 500. If it is, you’ll want to simply round down to zero with the zero + comma.
• #,###,
This part of the rule slashes off the last three places of the number and essentially performs the rounding for you.
Example 1: If your number was 123,456 —> This rule would give you the value appearance of 123
Example 2: If your number was 123,501 —> This rule would give you the value appearance of 124
• ",000"
The final part of the rule is simply tacking on three zeroes to the rounded number. This gives the appearance that you rounded to the nearest thousands. Since we want a comma separating every three digits, we need to include that in the string we are appending.
Round To Nearest Thousands (Negative Only)
Custom Number Format:
Format Rule: [>=-500]0,;(#,###,",000)"
How It Works:
• [>=-500]0,
The first part of the rule tests if the number is greater than or equal to -500. If it is, you’ll want to simply round up to zero with the zero + comma.
• (#,###,
This part of the rule slashes off the last three places of the number and essentially performs the rounding for you.
Example 1: If your number was -123,456 —> This rule would give you the value appearance of -123
Example 2: If your number was -123,501 —> This rule would give you the value appearance of -124
Since we want to use parenthesis instead of a dash, we add a “(“ symbol in front of the number. If we use the value in Example 2, the final output would look like this: (123
• ",000)"
The final part of the rule is simply tacking on three zeroes to the rounded number. This gives the appearance that you rounded to the nearest thousands. Since we want a comma separating every three digits, we need to include that in the string we are appending. The same concept with the closed-parenthesis at the end of the string.
How About Rounding To The Nearest Millions?
How would these rules look if you were wanting to round to the nearest millions? You essentially add more places into your custom number format rule. Here’s how both the positive and negative rules would look.
Round To Nearest Millions (Positive Only)
Custom Number Format:
Format Rule: [<=500000]0,,;#,###,,",000,000"
Round To Nearest Millions (Negative Only)
Custom Number Format:
Format Rule: [>=-500000]0,,;(#,###,,",000,000)"
Store Your Number Rules In The Ribbon!
Custom Number Format rules like the ones in this article can be a hassle to write and even more of a pain to remember how to write. That’s why I created the Excel add-in everyone has been buzzing about in 2020, the Number Formats Add-in.
This add-in will allow you to store up to 135 Custom Number Format rules in your Excel Ribbon so you can apply them with a click of the button. You can even save your most used format buttons to your Home tab.
Excel Add-in Features:
Store up to 135 Custom Number Format Rules
Full Button Customization (label, icon, hover-tip, location)
Add Favorites to your Home Tab
Apply Quick Math to your selected data
Includes Icon Library for the Excel Ribbon
Cycle through 3 Format Rules per button
Excel’s Decimal, Font/Fill Color, & Border buttons included
Apply Text Alignment with your Number Formats Rule
No recurring subscription (isn’t that refreshing?)
Free Updates
30-day money back guarantee
I Hope This Helped!
Hopefully, I was able to explain how you can use some unique aspects of Number Format rules to accomplish this rounding effect. If you have any questions about this technique or suggestions on how to improve it, please let me know in the comments section below.
About The Author
Hey there! I’m Chris and I run TheSpreadsheetGuru website in my spare time. By day, I’m actually a finance professional who relies on Microsoft Excel quite heavily in the corporate world. I love taking the things I learn in the “real world” and sharing them with everyone here on this site so that you too can become a spreadsheet guru at your company.
Through my years in the corporate world, I’ve been able to pick up on opportunities to make working with Excel better and have built a variety of Excel add-ins, from inserting tickmark symbols to automating copy/pasting from Excel to PowerPoint. If you’d like to keep up to date with the latest Excel news and directly get emailed the most meaningful Excel tips I’ve learned over the years, you can sign up for my free newsletters. I hope I was able to provide you some value today and hope to see you back here soon! - Chris