Reputation: 119
I have a text string which reflects thousand separators as a dot but also the decimal. I want to convert this to a number but retain the decimal.
1.056.865.39 should be 1056865.39
6.685.3 should be 6685.3
I've tried substitute and replace but I can't work out how to retain the last decimal. Any ideas how to do this in excel?
Upvotes: 0
Views: 240
Reputation: 75930
Try:
=SUBSTITUTE(TEXTBEFORE(A1,".",-1),".",)+TEXTAFTER(A1,".",-1)/100
Old Excel versions:
=NUMBERVALUE(SUBSTITUTE(D13,".",",",LEN(D13)-LEN(SUBSTITUTE(D13,".",))),",",".")
Upvotes: 5
Reputation: 9062
Excel 2013:
=SUBSTITUTE(A1,".","")/10^(1+(LEFT(RIGHT(A1,3))="."))
Upvotes: 2