如何将员工时间表数据从列转置为行
How can I transpose from a column to rows an employee timesheet data
我在 1 列中有一个员工时间表数据,需要将其转换为行和列。
原始数据有 1 列
mon
02/05/2022
9:04
12:47
13:52
18:09
-
-
tue
03/05/2022
9:13
13:03
14:06
18:10
-
-
wed
04/05/2022
8:58
12:57
14:08
18:19
-
-
thu
05/05/2022
8:52
12:26
13:32
17:39
-
-
fri
06/05/2022
10:13
13:10
14:15
18:14
-
-
sat
07/05/2022
-
-
-
-
-
-
sun
08/05/2022
-
-
-
-
-
-
mon
09/05/2022
8:49
12:46
13:48
18:11
-
-
tue
10/05/2022
8:52
12:51
13:55
18:07
-
-
将数据转置为 table,长度为 8 列
mon 02/05/2022 9:04 12:47 13:52 18:09 - -
tue 03/05/2022 9:13 13:03 14:06 18:10 - -
wed 04/05/2022 8:58 12:57 14:08 18:19 - -
thu 05/05/2022 8:52 12:26 13:32 17:39 - -
fri 06/05/2022 10:13 13:10 14:15 18:14 - -
sat - - - - - - -
sun - - - - - - -
mon 09/05/2022 8:49 12:46 13:48 18:11 - -
tue 10/05/2022 8:52 12:51 13:55 18:07 - -
我该怎么做?我尝试使用 =TRANSPOSE(QUERY
函数,但没有达到我的预期。
谢谢!
尝试:
={FILTER(A:A, MOD(ROW(A:A)-1, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-2, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-3, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-4, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-5, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-6, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-7, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-8, 8)=0)}
尝试:
={QUERY(A1:A, "skipping 8", ),
QUERY(A2:A, "skipping 8", ),
QUERY(A3:A, "skipping 8", ),
QUERY(A4:A, "skipping 8", ),
QUERY(A5:A, "skipping 8", ),
QUERY(A6:A, "skipping 8", ),
QUERY(A7:A, "skipping 8", ),
QUERY(A8:A, "skipping 8", )}
或:
={QUERY(A:A, "skipping 8", ),
QUERY(QUERY(A:A, " offset 1", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 2", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 3", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 4", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 5", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 6", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 7", ), "skipping 8", )}
我在 1 列中有一个员工时间表数据,需要将其转换为行和列。
原始数据有 1 列
mon
02/05/2022
9:04
12:47
13:52
18:09
-
-
tue
03/05/2022
9:13
13:03
14:06
18:10
-
-
wed
04/05/2022
8:58
12:57
14:08
18:19
-
-
thu
05/05/2022
8:52
12:26
13:32
17:39
-
-
fri
06/05/2022
10:13
13:10
14:15
18:14
-
-
sat
07/05/2022
-
-
-
-
-
-
sun
08/05/2022
-
-
-
-
-
-
mon
09/05/2022
8:49
12:46
13:48
18:11
-
-
tue
10/05/2022
8:52
12:51
13:55
18:07
-
-
将数据转置为 table,长度为 8 列
mon 02/05/2022 9:04 12:47 13:52 18:09 - -
tue 03/05/2022 9:13 13:03 14:06 18:10 - -
wed 04/05/2022 8:58 12:57 14:08 18:19 - -
thu 05/05/2022 8:52 12:26 13:32 17:39 - -
fri 06/05/2022 10:13 13:10 14:15 18:14 - -
sat - - - - - - -
sun - - - - - - -
mon 09/05/2022 8:49 12:46 13:48 18:11 - -
tue 10/05/2022 8:52 12:51 13:55 18:07 - -
我该怎么做?我尝试使用 =TRANSPOSE(QUERY
函数,但没有达到我的预期。
谢谢!
尝试:
={FILTER(A:A, MOD(ROW(A:A)-1, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-2, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-3, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-4, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-5, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-6, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-7, 8)=0),
FILTER(A:A, MOD(ROW(A:A)-8, 8)=0)}
尝试:
={QUERY(A1:A, "skipping 8", ),
QUERY(A2:A, "skipping 8", ),
QUERY(A3:A, "skipping 8", ),
QUERY(A4:A, "skipping 8", ),
QUERY(A5:A, "skipping 8", ),
QUERY(A6:A, "skipping 8", ),
QUERY(A7:A, "skipping 8", ),
QUERY(A8:A, "skipping 8", )}
或:
={QUERY(A:A, "skipping 8", ),
QUERY(QUERY(A:A, " offset 1", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 2", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 3", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 4", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 5", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 6", ), "skipping 8", ),
QUERY(QUERY(A:A, " offset 7", ), "skipping 8", )}