Extract Date as Text

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,843
Office Version
  1. 2010
Platform
  1. Windows
How would I extract June 1918 from the following as text please?

Excel Workbook
A
8June 1918 Moved to Dublin.
Sheet1
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Looking at your sample data, I'm wondering if this would also work for you?

=IF(MID(G12,4,1)=" ",LEFT(G12,8),TEXT(SUBSTITUTE(LEFT(G12,10),".","-"),"dd-mmm-yyyy"))
 
Upvote 0
Yes Ford, some will be September 1917 (I entered that in full to stop it reverting to 01-Sep-17) and other dates will be the actual date, the first of September 1917 (01-Sep-17)
 
Upvote 0
Looking at your sample data, I'm wondering if this would also work for you?

=IF(MID(G12,4,1)=" ",LEFT(G12,8),TEXT(SUBSTITUTE(LEFT(G12,10),".","-"),"dd-mmm-yyyy"))

I ran that down 100 sample rows of data and that is working too thank you Peter.
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,248
Members
453,026
Latest member
cknader

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top