If you already have a number in the cell then you can't change the format to text (...or you can but it doesn't work!). You can verify that - if data is in A1 then change format to text and use this formula in B1
=ISTEXT(A1)
The answer will be FALSE
You need to format the cells as text before you input the data - then the data will be displayed as entered
To format the column as text "after the fact" try this:
Select column of data then use
Data > Text to Columns > Next > Next > under "column data format" select "Text" > Finish
That should format the whole column as text and show the number of digits for each entry as entered.
Use FIND-function
to determine the position of your first and last space. After that, use theMID-function
to split your data into three parts. If you know the position of your spaces, the splitting is easy. Finding the first space is also trivial since FIND
goes from left to right. Unfortunatly, there is no way to tell Excel to search from right to left.
So the difficult part is, to determine the last space! Here we use an array formula.
To enter an array formula, you paste the formula into a cell and don't hit Enter.
Instead you press Ctrl+Shift+Enter.
{=MAX((MID(A2,ROW(A:A),1)=" ")*ROW(A:A))}
If done successfully, Excel will append a starting and ending curly bracket.
Insert all formulas at the given cells and use autofill down
A2: your data goes here
B2:=FIND(" ",A2,1)
C2:=MAX((MID(A2,ROW(A:A),1)=" ")*ROW(A:A))
<-array formula!
D2:=MID(A2,1,B2-1)
E2:=MID(A2,B2+1,C2-B2-1)
F2:=MID(A2,C2+1,LEN(A2))
Result screen
Best Answer
Use
&
to concatenate text.