This post will guide you how to filter only whole numbers from decimal numbers in a list in Excel. How do I filter cells with whole numbers or non-whole numbers in Excel.
Table of Contents
1. List Only Whole Numbers Using INT Function
Assuming that you have a list of data in range A1:A6, which contain decimal numbers and whole numbers. And you want to filter only the whole numbers or all non-whole numbers from the given list of data in Excel. You need to create a helper column next to the given data or range, and then using a formula based on INT function to check if the given number is integer or not. If return True, it indicates that this number is an integer or whole number. Otherwise, it is a non-whole number. Do the following steps:
#1 create a new column next to the numbers column, and type the following formula into cell B1.
=INT(A2)=A2
#2 press Enter key to apply this formula, and drag the AutoFill Handle down to other cells to apply this formula.
#3 select the helper column B, and go to DATA tab, click Filter button under Sort & Filter group. And one Filter icon added into the first cell in helper column.
#4 click filter icon in the Cell B1, and select TRUE or FALSE value as you what to filter out whole numbers or non-whole numbers. Click Ok button to apply for changes.
#5 you should see that all whole numbers have been filtered out . And if select FALSE option from the drop down list, and it will filtered out all decimal numbers.
2. List Only Whole Numbers from Decimal Numbers Using IF Function
You can also use another formula based on the IF function and the MOD function to achieve the same result. Like this:
=IF(MOD(A1,1)<>0,0,A1)
Note: This formula checks if the remainder (MOD) of dividing the decimal number by 1 is not equal to 0. If the remainder is not 0, it returns 0; otherwise, it returns the original number. This effectively filters out decimal numbers.
Type this formula into Cell C2 in a help column, and press Enter key.
You should see that all whole numbers have been listed. And all decimal number will be shown as 0.
3. Video: List Only Whole Numbers from Decimal Numbers
This tutorial video will show you how to extract and list only whole numbers from a set of decimal numbers in Microsoft Excel. In this video, we’ll walk through the process step by step using two effective methods.
4. SAMPLE FIlES
Below are sample files in Microsoft Excel that you can download for reference if you wish.
5. Related Functions
- Excel INT function
The Excel INT function returns the integer portion of a given number. And it will rounds a given number down to the nearest integer.The syntax of the INT function is as below:= INT (number)…
Leave a Reply
You must be logged in to post a comment.