• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Separate numbers in a cell

Cell C3 has an amount (2.1). I need to break that number into two cells. The number before the period and the number after the period. C4 will be the number before the period (2) and C5 will be the number after the period (1). See example. Thanks.
 

Attachments

  • Separate numbers in a cell.xlsx
    8 KB · Views: 13
@elsmith9035768,

For first value
=INT(C3)
for second value
=VALUE(SUBSTITUTE((INT(C3)-D3),".",""))

Cell C3 has an amount (2.1). I need to break that number into two cells. The number before the period and the number after the period. C4 will be the number before the period (2) and C5 will be the number after the period (1). See example. Thanks.
 
The second formula returns a "2". When I changed "D3" to "D2" the result is "-1". I cannot figure out how to remove the negative sign before the "1". Thanks.
 
A bit modified xlstime's 2nd formula :

=0+SUBSTITUTE((C3-INT(C3)),".","")

Or, another possible :

=0+MID(C3,FIND(".",C3)+1,16)

Regards
Bosco
 
Hi @elsmith9035768

Have you tried using text to columns in Data tab... there you can select what you want to be the delimiter, in this case the comma ","

Jpg1.jpg

Regards
 
Bosco,
The first formula works. But on 3 of the cells the result is (example: 1E+15). I assumed it was a cell formatting issues. I have General marked for the category. I appears the cell category is formatted for text, but it is not. I have tried all the categories but none work. Any ideas?

PCosat87, the cells to be separated are imported from another sheet and the text to columns function doesn't seem to be working.
 
Bosco,
The first formula works. But on 3 of the cells the result is (example: 1E+15). I assumed it was a cell formatting issues. I have General marked for the category. I appears the cell category is formatted for text, but it is not. I have tried all the categories but none work. Any ideas?

1E+15 is a number format in scientific notation also known as exponential notation. It means 1 x10^15 (One times ten to the power of 15).

Since it is a whole number without decimal, the 2nd formula to workaround by wrapping a IFERROR function as this :

=IFERROR(1/(1/SUBSTITUTE((C4-INT(C4)),".","")),"")

Regards
Bosco
 
Back
Top