Separate the In and Out Date from the Col"A"

ExcelMentee

Banned - Rules violations
Joined
Jan 11, 2021
Messages
31
Office Version
  1. 365
Platform
  1. Windows
when i download the data from software it comes in that shape.

Untitled Spreadsheet
Date In and OutIDName
13.01.2021 15:050000120066DFStefan Hellemans
13.01.2021 11:560000149E0240Lutgard Heremans
13.01.2021 08:200000149E0240Lutgard Heremans
13.01.2021 06:560000120066DFStefan Hellemans
12.01.2021 15:020000120066DFStefan Hellemans
12.01.2021 07:010000120066DFStefan Hellemans
11.01.2021 15:340000149E0240Lutgard Heremans
11.01.2021 14:590000120066DFStefan Hellemans
11.01.2021 08:240000149E0240Lutgard Heremans
11.01.2021 06:51000011FE671AStefan Hellemans
07.01.2021 09:33000011FE671AStefan Hellemans
06.01.2021 13:26000011FE671AStefan Hellemans

I want to convert this data into present able format that is

DataIDNameStartStop
1/7/2021​
000011FE671AStefan Hellemans07.01.2021 09:33
1/11/2021​
000011FE671AStefan Hellemans11.01.2021 06:5111.01.2021 14:59
1/11/2021​
0000149E0240Lutgard Heremans11.01.2021 08:2411.01.2021 15:34
1/12/2021​
000011FE671AStefan Hellemans12.01.2021 07:0112.01.2021 15:02
1/13/2021​
000011FE671AStefan Hellemans13.01.2021 06:5613.01.2021 15:05
1/13/2021​
0000149E0240Lutgard Heremans13.01.2021 08:2013.01.2021 11:56

First It will get the date in the format that i have use but i paste these dates manually because TEXT function is not working for this
Secondly Its name and ID's will paste accordingly.
Third one is the main formula or function that to separate the Start date and the Stop Date from the "Date In and Out" Column.

your help will be highly appreciated.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
format to your preferences
You can convert the new range to values and then delete the original data

Date and Time 2021.xlsm
ABCDEFG
1Date In and OutIDNameDateIDNameStart
213.01.2021 15:050000120066DFStefan Hellemans13-Jan-210000120066DFStefan Hellemans13-Jan-21 15:05
1c
Cell Formulas
RangeFormula
D2D2=--SUBSTITUTE(LEFT(A2,10),".","-")
E2:F2E2=B2
G2G2=D2+RIGHT(A2,5)
 
Upvote 0
Thank you so much for giving the answer. But what about In and Out
how to fetch the Start and Stop.
Untitled Spreadsheet

Untitled Spreadsheet
In and OutIDName
13.01.2021 15:050000120066DFStefan Hellemans
13.01.2021 06:560000120066DFStefan Hellemans
12.01.2021 15:020000120066DFStefan Hellemans
12.01.2021 07:010000120066DFStefan Hellemans
11.01.2021 14:590000120066DFStefan Hellemans
11.01.2021 06:510000120066DFStefan Hellemans
07.01.2021 09:330000120066DFStefan Hellemans
06.01.2021 13:260000120066DFStefan Hellemans
Want this result from Above data
DataIDNameStartStop
13-01-20210000120066DFStefan Hellemans13.01.2021 06:5613.01.2021 15:05
12-01-20210000120066DFStefan Hellemans12.01.2021 07:0112.01.2021 15:02
11-01-20210000120066DFStefan Hellemans11.01.2021 06:5111.01.2021 14:59
07-01-20210000120066DFStefan Hellemans07.01.2021 09:33If same date don’t found for stop it will be empty
06-01-20210000120066DFStefan Hellemans06.01.2021 13:26
 

Attachments

  • 1610631705435.png
    1610631705435.png
    57.4 KB · Views: 3
Upvote 0
Please clarify how you arrive at the start and end times
Adjust the formulas to show the information that you require.

Date and Time 2021.xlsm
ABCDEF
1Date In and OutIDNameStartStop
213.01.2021 15:0513-Jan-210000120066DFStefan Hellemans13-Jan-21 15:05
313.01.2021 11:5613-Jan-210000149E0240Lutgard Heremans13-Jan-21 11:56
1c
Cell Formulas
RangeFormula
B2:B3B2=--SUBSTITUTE(LEFT(A2,10),".","-")
E2:E3E2=B2+RIGHT(A2,5)
 
Last edited:
Upvote 0
The hours has been used as 1 to 24.
so the in time is will be early time and considered as Start.
Late time will be considered as Stop.

This is apply on same date.
 
Upvote 0
You can post an extract of your data with the forum's tool called XL2BB.

You can sort the data and then extract the data for start or end.
 
Upvote 0
with Power Query
(@post#3)
In and OutIDNameDateIDNameStartStop
13.01.2021 15:050000120066DFStefan Hellemans13/01/20210000120066DFStefan Hellemans13/01/2021 06:5613/01/2021 15:05
13.01.2021 06:560000120066DFStefan Hellemans12/01/20210000120066DFStefan Hellemans12/01/2021 07:0112/01/2021 15:02
12.01.2021 15:020000120066DFStefan Hellemans11/01/20210000120066DFStefan Hellemans11/01/2021 06:5111/01/2021 14:59
12.01.2021 07:010000120066DFStefan Hellemans07/01/20210000120066DFStefan Hellemans07/01/2021 09:33
11.01.2021 14:590000120066DFStefan Hellemans06/01/20210000120066DFStefan Hellemans06/01/2021 13:26
11.01.2021 06:510000120066DFStefan Hellemans
07.01.2021 09:330000120066DFStefan Hellemans
06.01.2021 13:260000120066DFStefan Hellemans

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    DT = Table.TransformColumnTypes(Source,{{"In and Out", type datetime}}),
    Date = Table.AddColumn(DT, "Date", each DateTime.Date([In and Out]), type date),
    Group = Table.Group(Date, {"ID", "Name", "Date"}, {{"Start", each List.Min([In and Out]), type datetime}, {"Max", each List.Max([In and Out]), type datetime}}),
    IF = Table.AddColumn(Group, "Stop", each if [Start] = [Max] then "" else [Max]),
    Type = Table.TransformColumnTypes(IF,{{"Stop", type datetime}}),
    TSC = Table.SelectColumns(Type,{"Date", "ID", "Name", "Start", "Stop"})
in
    TSC
 
Upvote 0

Dave Patton

I have just pasted the sample data this data comes in large size.
So filtration will take time.

here i have attached sheet please review
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,047
Members
449,064
Latest member
scottdog129

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