Extract Month & Year

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,566
Office Version
  1. 2021
Platform
  1. Windows
I have text in D1 and would like to extract the month and year - 30 days i.e the previous month and the current year





Book1
D
1Date updated: 18/01/2018 17:07
Fixed assets Recon
Cell Formulas
RangeFormula
D1="Date updated: "&TEXT(NOW(),"dd/mm/yyyy hh:mm")



The month is Jan 2018 in D1 and I would like to extract it as Dec 2017

eg if the date appears as 28/02/2018 then I would to extract the month and year as Jan 2018 etc


Your assistance in this regard is most appreciated
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
You can extract the date and use Edate to calculate previous month.
You can custom format the date or use Text to show the date as text.

Excel 2010
DE
1Date updated: 18/01/2018 17:0718-Jan-2018 17:07
2Dec 2017
3Dec 2017
2a
Cell Formulas
RangeFormula
E1=RIGHT(D1,16)+0
E2=EDATE(E1,-1)
E3=TEXT(EDATE(E1,-1),"mmm yyy")
 
Upvote 0
Thanks for the help, formulas work perfectly
 
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,342
Members
449,218
Latest member
Excel Master

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