Reorder the 3 column data into 2 columns of 24 rows

konnursrikant

New Member
Joined
Apr 22, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I want to transform this data into two columns as Day 1 and Day 2 , starting with the day 1 first value and end day 1 for 24 hours later (2pm-2pm next day as day 1) and next 24 values as day 2. The start time for Day 1 keeps changing for different scenarios. I want a dynamic formula to Setup day 1 and day 2. I have 200+ such sheets. So a quick and easy process is much appreciated.


MonTueWed
2023-01-302023-01-312023-02-01
00:00:00
179​
191​
01:00:00
109​
127​
02:00:00
93​
101​
03:00:00
144​
126​
04:00:00
255​
245​
05:00:00
727​
747​
06:00:00
1339​
1395​
07:00:00
1838​
1755​
08:00:00
1703​
1847​
09:00:00
1404​
1494​
10:00:00
1279​
1334​
11:00:00
1162​
1236​
12:00:00
1155​
1399​
13:00:00
1236​
1305​
14:00:00
1294​
1280​
15:00:00
1329​
1315​
16:00:00
1118​
1169​
17:00:00
1255​
1278​
18:00:00
1057​
1092​
19:00:00
883​
924​
20:00:00
666​
660​
21:00:00
474​
567​
22:00:00
482​
527​
23:00:00
306​
312​
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi, Its a bit of a convoluted formula, and there maybe cleaner versions out there .., but here's one way to do it :

Rgds
Rob

Book1
ABCDEFGHI
1
2MonTueWedDay1Day2
330/01/202331/01/202301/02/2023
400:00:001791911118245
501:00:001091271255747
602:00:009310110571395
703:00:001441268831755
804:00:002552456661847
905:00:007277474741494
1006:00:00133913954821334
1107:00:00183817553061236
1208:00:00170318471791399
1309:00:00140414941091305
1410:00:0012791334931280
1511:00:00116212361441315
1612:00:0011551399
1713:00:0012361305
1814:00:0012941280
1915:00:0013291315
2016:00:0011181169
2117:00:0012551278
2218:00:0010571092
2319:00:00883924
2420:00:00666660
2521:00:00474567
2622:00:00482527
2723:00:00306312
Sheet1
Cell Formulas
RangeFormula
G4:H15G4=LET(arrval,VSTACK(B4:B27,C4:C27,D4:D27),newval,FILTER(arrval,arrval<>0),dayone,TAKE(newval,12,1),daytwo,TAKE(newval,-12,1),result,HSTACK(dayone,daytwo),result)
Dynamic array formulas.
 
Upvote 0
Hi, not sure to understand what you mean sorry ? What is in column F ?
 
Upvote 0
sorry, I just realised I was taking 12 values, not 24 ... Correction below

Excel Formula:
=LET(arrval,VSTACK(B4:B27,C4:C27,D4:D27),newval,FILTER(arrval,arrval<>0),dayone,TAKE(newval,24,1),daytwo,TAKE(newval,-24,1),result,HSTACK(dayone,daytwo),result)
 
Upvote 1
Solution
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Reorder the 3 column data into 2 columns of 24 rows
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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