View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
[email protected] jake.cooper.94@gmail.com is offline
external usenet poster
 
Posts: 2
Default Formula to identify decimal versus whole numbers

I know this is 5 years later, but it's still at the top of the Google search results list for "Excel whole number".

So here's a simple solution to your problem in particular.
Using nested IF's and the INT function, I was able to make a formula that returns "Whole Number" for whole numbers, "Half Number" for anything ending in .5, and "Other Decimal" for any number that doesn't fit into the first 2 catagories.

=IF(INT(A1)=A1,"Whole Number",IF(INT(A1)+0.5=A1,"Half Number","Other Decimal"))


A general solution to "Is A1 a whole number"

=IF(INT(A1)=A1,,)

This returns TRUE, or FALSE.