Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Returning Least-Significant Digits.
by Allen Wyatt
(last updated May 20, 2021)
Glenn has a need to return the three least significant digits of a four-digit number and is wondering how this can best be done. As with many tasks in Excel, there are a number of ways you can derive the desired information. One way is to use the MOD function, in this manner:
This function divides the value in cell A1 by 1000 and then returns what is left over. Provided that the value in A1 is a four-digit integer, then you'll get the result you desire.
Another similar method of determining the desired values is to use a function that is normally used with text values:
This returns the three right-most characters (digits) of whatever is in cell A1. If you think that it is possible that A1 could have some non-digit characters in it, then you should wrap the function in the VALUE function, like this:
Of course, it is very possible that any of the approaches discussed so far will give undesired results. While they work well if the value in A1 is an integer value, they don't work that well if the value is a real number, such as 12.36 or 105.2, having four significant digits. In these cases you may want to use a formula such as the following:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3414) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Returning Least-Significant Digits.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
If you have a mixture of numbers and letters in a cell, you may be looking for a way to access and use the numeric ...Discover More
It is not uncommon to reuse formulas in a variety of workbooks. If you develop some "gotta keep" formulas, here are some ...Discover More
Excel is usually more flexible in what you can reference in formulas than is immediately apparent. This tip examines some ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.