Split a number

  • Thread starter Thread starter lans
  • Start date Start date
L

lans

Hi everybody,

Can anyone tell me how I can split a number. For example, if I have the
number 20030204, I want to split it in 2003, 02 and 04 (4 february
2003). Thanks in advance.

Best regards
 
Hello lans,

If the pattern of your data is the same with your sample you can make use of
"Text to Columns".
Select the cells that contain your data (It must be continuous and in
only one column)
On the menu bar>Data>Text to column
Click the next button twice
On the column data format choose Date and in the dropdown opposite to
this choose "YMD"
Click finish
You have to format your cell as date formatted as "yyyy mm dd"

BTW, when you say split, does it mean you want to make it in appear in
three column? If that is the case, you can also use "Text to Column".
Perhaps, I can leave it to you on how to figure that out.

Regards,

Jon-jon
 
Lans,

If your objective is to turn it into a bona fide Excel date, use:

=DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2))

Format the formula cell for the date format desired (Format - Cells -
Number - Date or Time)
 
Back
Top