split date and time values out to separate cells

nightracer

Board Regular
Joined
May 17, 2004
Messages
147
Office Version
  1. 365
Hi all, I have some data that shows date and times in a single cell as:

Cell A1
2023-05-02 18:00 - 21:30

Other than text to columns, is there a formula I could use to split this into:
Cell B1 (date) 02.05.23
Cell C1 (time 1) 18:00
Cell D1 (time 2) 21:30

Any help appreciated
N
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
You didn't action Fluff's comment in your last thread.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
If you have MS 365 or Office 2021 you will have more options but this should work.
Note: You will need to format the cells as date and time x 2

Book1
ABCD
12023-05-02 18:00 - 21:302/05/202318:0021:30
Sheet1
Cell Formulas
RangeFormula
B1B1=DATEVALUE(LEFT($A1,10))
C1C1=TIMEVALUE(MID($A1,12,5))
D1D1=TIMEVALUE(RIGHT($A1,5))
 
Upvote 0
Given that you have just updated your profile, even though this thread is quite old, you may be interested in another option (as alluded to by Alex) where you can get all 3 values with a single formula.

23 12 04.xlsm
ABCD
12023-05-02 18:00 - 21:3002.05.202318:0021:30
Date Time
Cell Formulas
RangeFormula
B1:D1B1=--TEXTSPLIT(A1,{" "," - "})
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,729
Members
452,939
Latest member
WCrawford

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