Excel String question

  • Thread starter Thread starter Practiceguys
  • Start date Start date
P

Practiceguys

How do I insert a character into a string at a specified position.

ie; 19120725 needs to be 1912/07/25....

Thanks,
 
=LEFT(A2,4)&"/"&MID(A2,5,2)&"/"&RIGHT(A2,2) or
=TEXT(A2,"0000\/00\/00")
 
You would need a combination of LEFT, MID and RIGHT functions to do
this.

If your data was in A1, try this:

=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&RIGHT(A1,2)


HTH,
JP
 
One way.........
=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&RIGHT(A1,2)

Vaya con Dios,
Chuck, CABGx3
 
I'd convert the value to a real date and then format that cell the way I want.
Then I could use that real date in other calculations.

=--(TEXT(A1,"0000\/00\/00"))

(and with a custom format of yyyy/mm/dd)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top