How to List Only Whole Numbers From Decimal Numbers in Excel

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.

=INT(A2)=A2

#2 press Enter key to apply this formula, and drag the AutoFill Handle down to other cells to apply this formula.

list only whole numbers 1

#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.

list only whole numbers 2

#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.

list only whole numbers 3

 

#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.

list only whole numbers 4

Note: 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)

Type this formula into Cell C2 in a help column, and press Enter key.

list only whole numbers5

You should see that all whole numbers have been listed. And all decimal number will be shown as 0.

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)…

You might also like:

Comments

So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar