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.
List Only Whole Numbers
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.
#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.
Note: you can also use another formula based on the IF function and the MOD function to achieve the same result. Like this:
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.
- 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)…