ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel String question (https://www.excelbanter.com/excel-discussion-misc-queries/172155-excel-string-question.html)

Practiceguys

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

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

Thanks,

David Biddulph[_2_]

Excel String question
 
=LEFT(A2,4)&"/"&MID(A2,5,2)&"/"&RIGHT(A2,2) or
=TEXT(A2,"0000\/00\/00")
--
David Biddulph

"Practiceguys" wrote in message
...
How do I insert a character into a string at a specified position.

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

Thanks,




JP[_4_]

Excel String question
 
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

On Jan 8, 3:17*pm, Practiceguys
wrote:
How do I insert a character into a string at a specified position.

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

Thanks,



CLR

Excel String question
 
One way.........
=LEFT(A1,4)&"/"&MID(A1,5,2)&"/"&RIGHT(A1,2)

Vaya con Dios,
Chuck, CABGx3


"Practiceguys" wrote:

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

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

Thanks,


Dave Peterson

Excel String question
 
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)

Practiceguys wrote:

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

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

Thanks,


--

Dave Peterson


All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com