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.
 

sandy666

Power Query is different thing.
I did not used it before so it will take time to understand power Query
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Power Query is different thing.
I did not used it before so it will take time to understand power Query
sure, no problem
here is almost everything about Power Query
btw. your file on GoogleDrive isn't shared
 
Upvote 0
Try this:
I used column D to K, if they aren't empty Change Columns.
VBA Code:
Sub SumifsMultyWS()
Dim Ws As Worksheet, S As Double, Lr As Long, Ws1 As Worksheet, i As Long, T As Long
Dim j As Long, K As Double
Lr = Cells(Rows.Count, 1).End(xlUp).Row
Range("A1:C" & Lr).Sort key1:=Columns("B"), Order1:=xlAscending, Key2:=Columns("A"), Order2:=xlAscending, Header:=xlYes
Range("D1").Value = "MainDate"
Range("G1").Value = "ID"
Range("H1").Value = "Name"
Range("I1").Value = "Date"
Range("J1").Value = "Start Time"
Range("K1").Value = "End Time"
For i = 2 To Lr
Range("D" & i).Value = Int(Range("A" & i).Value)
Range("E" & i).Value = Range("A" & i).Value - Range("D" & i).Value
Next i

Range("B2:D" & Lr).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("G2:I2"), Unique:=True

For i = 2 To Lr
For j = 2 To Lr
If Range("I" & i).Value = Range("D" & j).Value And Range("G" & i).Value = Range("B" & j).Value Then
T = j - 1
If Range("J" & i).Value = "" Then
S = Application.WorksheetFunction.IfError(Application.WorksheetFunction.Index(Range("A2:A" & Lr), T), "")
Range("J" & i).Value = S - Range("I" & i).Value
End If
If Range("E" & j).Value > Range("J" & i).Value Then
K = Application.WorksheetFunction.IfError(Application.WorksheetFunction.Index(Range("A2:A" & Lr), T), "")
Range("K" & i).Value = K - Range("I" & i).Value
End If
End If
Next j
Next i

End Sub
 
Upvote 0
Column A I used find and replace to make date
I sorted by name & Date


Date and Time 2021.xlsm
ABCDEF
5Date In and OutNameDateStartStopStop
611-01-21 8:24Lutgard Heremans1111-Jan-21 08:2411-Jan-21 15:3411-Jan-21 15:34
711-01-21 15:34Lutgard Heremans11  11-Jan-21 15:34
813-01-21 8:20Lutgard Heremans1313-Jan-21 08:2013-Jan-21 11:5613-Jan-21 11:56
913-01-21 11:56Lutgard Heremans13  13-Jan-21 11:56
1006-01-21 13:26Stefan Hellemans66-Jan-21 13:26 6-Jan-21 13:26
1107-01-21 9:33Stefan Hellemans77-Jan-21 09:33 7-Jan-21 09:33
1211-01-21 6:51Stefan Hellemans1111-Jan-21 06:5111-Jan-21 14:5911-Jan-21 14:59
1311-01-21 14:59Stefan Hellemans11  11-Jan-21 14:59
1412-01-21 7:01Stefan Hellemans1212-Jan-21 07:0112-Jan-21 15:0212-Jan-21 15:02
1512-01-21 15:02Stefan Hellemans12  12-Jan-21 15:02
1613-01-21 6:56Stefan Hellemans1313-Jan-21 06:5613-Jan-21 15:0513-Jan-21 15:05
1713-01-21 15:05Stefan Hellemans13  13-Jan-21 15:05
1c
Cell Formulas
RangeFormula
C6:C17C6=DAY(A6)
D6D6=A6
E6:E17E6=IF(C6=C7,MAX(A6:A7),"")
F6:F17F6=AGGREGATE(14,6,A$6:A$17/($B$6:$B$17=$B6)*($C$6:$C$17=C6),1)
D7:D17D7=IF(AND(C7=C6,B7=B6),"",A7)
 
Upvote 0
Solution

Forum statistics

Threads
1,216,101
Messages
6,128,835
Members
449,471
Latest member
lachbee

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