Cells marked to correlate time in column

2068Rod

New Member
Joined
Aug 6, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am wanting the cells marked X to correlate with the time in the marked column, i then want to be able to calculate the difference between multiple x's marked in a single row.
These are delivery drivers, wanting to work out how many loads a day, time between loads, then finally average time between loads.

1722981568282.png



Hope this makes sense, very new to this.
Appreciate your help.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
As you are using Microsoft 365 the natural way will be by Power Query.
Write somethiung like "Driver" or "Reg. plate" in upper-left corner. Select all your table (starting with times row (not the one above containing just word time).
In Table Design uncheck Filter button
Then Data->Get & Transform Data -> From Table/Range will open PQ editor with your data loaded in. Column with Drivers shall be selected already so do: Transform->Unpivot Columns (note that you shall Click on small triangle to show options)->Unpivot Other Columns
Click on ABC123 icon next to Attributes column and select time
(you may right click on value column (x only values) and delete it)
Close and load your data.

If you are interested in it) the code of query which has been recordes shall look like:
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Driver"}, "Attribute", "Value"),
    #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Attribute", type time}})
in
    #"Changed Type"

If new x's are added or removed to your table or drivers list change, right click on the output table you received and select Refresh from pop-up window.

Zrzut ekranu 2024-08-07 132951.png
 
Upvote 0
You could also do it by formula. Below is a small example.

BTW, for the future I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. It will generally get you faster/better responses. :)

24 08 27.xlsm
ABCDEFGHIJKL
15:005:055:105:155:205:255:305:355:405:45
2WIC01x
3WIC02
4WIC03xx
5WIC04x
6WIC05x
7WIC06xxx
8WIC07xxx
9
10
11WIC015:35
12WIC035:05
13WIC035:30
14WIC045:20
15WIC055:35
16WIC065:00
17WIC065:30
18WIC065:45
19WIC075:10
20WIC075:15
21WIC075:20
22
x
Cell Formulas
RangeFormula
A11:B21A11=LET(r,TEXTSPLIT(TEXTJOIN("|",1,IF(B2:K8="x",A2:A8&"#"&B1:K1,"")),"#","|"),IFERROR(--r,r))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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