Extract Date as Text

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,838
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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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