I inherited a list with 2800 records, each identified with 3 decimals. For example. 1.1.2.4 or 1.2.4.23, or 10.15.123.43.
I would like to display the items consistently in the following format ##.##.##.###. So, my first entry above would display as .01.01.02.004.
Is that possible? I have tried many formatting options, but then I realized the 1.1.2.4 is not really a number, because numbers have only one decimal point. Any help is appreciated. i really don't want to enter all 2800 cells again.
Larry
There might be a shorter way..but
If you put this formula in an adjacent cell:
Where A1 represents first cell to parse.=TEXT(0+TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",100)),1,100)),"00.")&TEXT(0+TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",100)),100,100)),"00.")&TEXT(0+TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",100)),200,100)),"00.")&TEXT(0+TRIM(MID(SUBSTITUTE(A1,".",REPT(" ",100)),300,100)),"000")
Then copy down to convert all,
Then you can copy this column and paste special >> Values over your original column and delete the formula column.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
If by any chance you meant 00.00.000.000 (given the last of your examples has three digits in third sub section) then another alternative might be to convert the original to a number and apply a Custom Format
Assume original values in A1, A2 etc then:
However, I suspect the above fails requirements... thought I'd post it just in case.B1: =SUMPRODUCT(10^{8;6;3;0}*MID(SUBSTITUTE(A1,".",REPT(" ",LEN(A1))),1+LEN(A1)*{0;1;2;3},LEN(A1))) copied down Custom Format to B1:Bn of: 00\.00\.000\.000
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks