Help Me Extract 2nd date from Cell

maximillianrg

Board Regular
Joined
Aug 7, 2014
Messages
75
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel Masters

In Cell A2 I have a formula that extracts the first date it finds in cell L2 and this works great. Now I need to write a similar formula that finds the second date in cell L2 and extracts the date. Can you help?
The below formula finds the 1st "-" and get the date. Not sure how to tell excel to find the 3rd "-" in L2.

Cell A2 Formula: =MID(" "&L2,FIND("-"," "&L2,1)-2,11)
Cell L2 Text: The very first date in this text string is 15-APR-2024 and the status update is 08-DEC-2023 and the stats is
Cell A2 Formula results: 15-APR-2024
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
try
Libro1
ABKL
1
215-APR-202408-DEC-202315-APR-2024 and the status update is 08-DEC-2023 and the stats is
3
Hoja1
Cell Formulas
RangeFormula
A2A2=MID(" "&L2,FIND("-"," "&L2,1)-2,11)
B2B2=MID(L2,FIND("-",L2,FIND("-",L2)+10)-2,11)
 
Upvote 0
Hello DanteAmor, the formula you provided worked absolutely perfectly and taught me that I need to study the find command in much more detail. In applying the above two formulas I discovered some inconsistencies in the data I'm using that are preventing the formula from working as I need it to si I wanted to ask for some additional help

Lets say L2 now contains the below text.

Deployment schedule ETA: 15-MAR-2024
Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023
Remark: 18-JAN-2024 (CL): Project has

Is it possible to write a formula that
a. finds the first "-" after the word "Remark"
b. extracts "18" before the "-" and "JAN-2024" after the "-"
c. produces the output of 18-JAN-2024

The challenge is I have inconsistencies like extra spaces or missing spaces in the text like below so the formula needs to account for these. I was not able to tweek the formula you created to pull 18-JAN-2024 for all of the below variations

Remark: 18-JAN-2024 (CL): Project has
Remark: 18-JAN-2024 (CL): Project has
Remark:18-JAN-2024 (CL): Project has
Remark:18-JAN-2024 (CL): Project has


The challengs is I may have the
 
Upvote 0
Lets say L2 now contains the below text.

Deployment schedule ETA: 15-MAR-2024
Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023
Remark: 18-JAN-2024 (CL): Project has
produces the output of 18-JAN-2024

Try this:
Dante Amor
ABCL
1Fisrt DateSecond Datevar
215-MAR-202418-JAN-20241Deployment schedule ETA: 15-MAR-2024 Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023 Remark: 18-JAN-2024 (CL): Project has
315-MAR-202418-JAN-20242Deployment schedule ETA: 15-MAR-2024 Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023 Remark: 18-JAN-2024 (CL): Project has
415-MAR-202418-JAN-20243Deployment schedule ETA: 15-MAR-2024 Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023 Remark: 18-JAN-2024 (CL): Project has
515-MAR-202418-JAN-20244Deployment schedule ETA: 15-MAR-2024 Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023 Remark:18-JAN-2024 (CL): Project has
615-MAR-202418-JAN-20245Deployment schedule ETA: 15-MAR-2024 Deployment Status (Partial/Complete): Temp deployment completed on 28-JUL-2023 Remark:18-JAN-2024 (CL): Project has
Hoja1
Cell Formulas
RangeFormula
A2:A6A2=MID(" "&L2,FIND("-"," "&L2,1)-2,11)
B2:B6B2=MID(L2,FIND("-",L2,FIND("Remark:",L2)+7)-2,11)



😇
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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