ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Transpose date macro (https://www.excelbanter.com/excel-worksheet-functions/17922-transpose-date-macro.html)

Henry Lifton

Transpose date macro
 
Does anybody know how to transpose text in a field?

I have a column containing dates Jun-01-1900. I need to change it to say
01-Jun-1900

Also, some of the entries may have only one didgit for the day (Jun-1-1900)

There are over 900 entries in this column so I do not want to do it
manually.

Any help will be greatly appresicated

Henry

N Harkawat

If the dates shown are shown as text then the following should do

=SUBSTITUTE(MID(A1,FIND("xx",SUBSTITUTE(A1,"-","xx",1))+1,2)&"-"&LEFT(A1,3)&"-"&MID(A1,FIND("xx",SUBSTITUTE(A1,"-","xx",2))+1,4),"--","-")

If these are shown as dates (as in numers) then take a look at the date
function Text function


"Henry Lifton" wrote in message
. ..
Does anybody know how to transpose text in a field?

I have a column containing dates Jun-01-1900. I need to change it to say
01-Jun-1900

Also, some of the entries may have only one didgit for the day
(Jun-1-1900)

There are over 900 entries in this column so I do not want to do it
manually.

Any help will be greatly appresicated

Henry




Henry Lifton

Thanks so much for your brilliant solution. You saved me hours and hours
of work

Regards
Henry


"N Harkawat" wrote in
:

If the dates shown are shown as text then the following should do

=SUBSTITUTE(MID(A1,FIND("xx",SUBSTITUTE(A1,"-","xx",1))+1,2)&"-"&LEFT(A1
,3)&"-"&MID(A1,FIND("xx",SUBSTITUTE(A1,"-","xx",2))+1,4),"--","-")

If these are shown as dates (as in numers) then take a look at the
date function Text function


"Henry Lifton" wrote in message
. ..
Does anybody know how to transpose text in a field?

I have a column containing dates Jun-01-1900. I need to change it to
say 01-Jun-1900

Also, some of the entries may have only one didgit for the day
(Jun-1-1900)

There are over 900 entries in this column so I do not want to do it
manually.

Any help will be greatly appresicated

Henry







All times are GMT +1. The time now is 06:59 PM.

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