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

Cash Denomination Calculator

Every country has different cash denominations, so you may need to calculate the number of different denominations based on the total amount. If it is just a small amount of cash, then you can calculate the different cash denominations manually, ...

Calculate Years Between Dates In Ms Excel

If you are an avid Ms Excel user, then you might have come across a task in which you needed to calculate the years between the dates; you might take it easy and do this task manually, which is also ...

Calculate Number of Hours between Two Times

Calculating the difference between two times might be a valuable statistic for subsequent computations or averages, whether you're producing a time sheet for staff or recording personal exercises. While Excel has a plethora of complex functions, including date and time ...

Extract date from multiple cells containing both date and time

As if you have got a cell containing date along with the time in the same cell and you want to extract the date into a separate cell, then for one or two cells, you can extract the date manually ...

How to Auto Fill Weekdays or Weekends in Excel

Sometimes we may want to enter a sequence of days in excel for some purpose, and we can press Ctrl+; to insert current date into cell, and then drag the cell down to attach following days into other cells, then ...

Comments

So empty here ... leave a comment!

Leave a Reply

Sidebar