extracting text from a string basis multiple delimiters

ali1985

New Member
Joined
Dec 14, 2019
Messages
18
Office Version
  1. 2016
Hi Experts,

I need a combined formula to extract the 3 text (date, month & year) from a string. the delimiters could be space, comma, - and /. can we manage this in one single formula?

I've listed down few examples below.....the date would be entered in cell A1 and basis the delimiters, the 3 output should be updated in 3 columns

Inputs Outputs that i need in 3 columns

Output in col B Output in col C output in col D
03.05.22 03 05 22
22/04/2022 22 04 2022
06-23-2021 06 23 2021
2022 04 01 2022 04 01
2022-Sep.01 2022 Sep 01
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Your samples would be much easier to understand/copy/use if you provided them with XL2BB

Those outputs look strange (order)to me but this seems to produce them

22 10 06.xlsm
ABCD
103.05.22030522
222/4/20222242022
306-23-202106232021
42022 04 0120220401
52022-Sep.012022Sep01
Sheet2
Cell Formulas
RangeFormula
B1:D5B1=TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(" "&$A1,"."," "),"/"," "),"-"," ")," ",REPT(" ",20)),COLUMNS($B:B)*20,20))
 
Upvote 0
Solution
Your samples would be much easier to understand/copy/use if you provided them with XL2BB

Those outputs look strange (order)to me but this seems to produce them

22 10 06.xlsm
ABCD
103.05.22030522
222/4/20222242022
306-23-202106232021
42022 04 0120220401
52022-Sep.012022Sep01
Sheet2
Cell Formulas
RangeFormula
B1:D5B1=TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(" "&$A1,"."," "),"/"," "),"-"," ")," ",REPT(" ",20)),COLUMNS($B:B)*20,20))
This is perfect. Thank you so much
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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