macro to get date from a cell of words

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,197
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,

In cell G28 i have this "robe UK AD Oct 2021.csv"

Now everything will always be in the same place, i want to get the date 01/10/2021 into G30 from the above data by pulling the year and the month out and using 01 for day always
totally stuck as i cant get vba or excel to recognise Oct or Nov or Dec as months?

please help if you can thanks
Tony
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Do you need a macro, you can just use this formula
Excel Formula:
=MID(G28,FIND("^",SUBSTITUTE(G28," ","^",3))+1,8)*1
 
Upvote 0
or with G30 formatted as date you could use

Excel Formula:
=DATEVALUE(MID(G28,LEN(G28)-11,8))
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,612
Members
449,238
Latest member
wcbyers

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