Splitting a number into integer and decimal portions
Here is a quick formula tip to start another awesome week.
Often while working with data, I need to split a number in to integer and decimal portions. Now, there are probably a ton of ways you can do this. But here are two formulas I use quite often and they work well.
Assuming the number is in cell A1,
- Integer part =INT(A1)
- Decimal part =MOD(A1,1)
These formulas work whenever my data has only positive numbers (which is the case 90% 0f time). But if I am dealing with a mix of positive and negative numbers, I use,
- Integer part
- Decimal part =MOD(A1,SIGN(A1))
What formulas do you use to process numbers?
What about you? What formulas do you use and how do you process your numbers? Please share using comments.
Do you want to be awesome in Excel?
Here is a smart way to become awesome in Excel. Just signup for my Excel newsletter. Every week you will receive an Excel tip, tutorial, template or example delivered to your inbox. What more, as a joining bonus, I am giving away a 25 page eBook containing 95 Excel tips & tricks. Please sign-up below:
Your email address is safe with us. Our policies
More awesome tips for you:
Leave a Reply
|VLOOKUP Formula Cheat-sheet – FREE Download||An Excel Dashboard to Visualize 10,007 Comments [Dashboard Tutorial]|