Rearranging text in cell based on special character

rangequestion

Board Regular
Joined
Nov 21, 2016
Messages
62
Hello,

I have multiple date values that look like one of these 2 options:

5/4/2017 12:00:00 AM
20/12/2017 00:00:00

What I'd like to do is only keep the date and convert it in US format. It's in European now. So for the example above I would want:

4/5/2017
12/20/2017

thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Have a look at text to columns > Delimited > Next > uncheck all boxes > Date MDY > Finish
 
Upvote 0
In that case I'm afraid I can't help, formulae are not my strong point
 
Upvote 0
Hi,

Are those Real Date/Time values (number)? Or are they Text?

If they're Real Date/Time values:


Book1
AB
35/4/2017 12:00:00 AM4/5/2017
420/12/2017 00:00:0012/20/2017
Sheet8
Cell Formulas
RangeFormula
B3=TEXT(A3,"m/d/yyyy")
 
Upvote 0
No, that's the problem, its text and custom format. SO Excel is really hating it right now.

Hopefully your data are all in the same format as the samples you posted:


Book1
AB
1Raw DataFormatted as Date
25/4/2017 12:00:00 AM4/5/2017
320/12/2017 00:00:0012/20/2017
Sheet9
Cell Formulas
RangeFormula
B2=MID(SUBSTITUTE(A2,"/","/"&LEFT(A2,FIND("/",A2)),2),FIND("/",SUBSTITUTE(A2,"/","/"&LEFT(A2,FIND("/",A2)),2))+1,LEN(A2)-LEN(MID(A2,FIND(" ",A2),255)))+0


Formula copied down, results are converted to Real Dates, just format cells as Date.
 
Upvote 0
You're welcome, glad it worked for you.
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,255
Members
448,879
Latest member
oksanana

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