=DROP(
REDUCE(
"",
B2:B5,#将字符串进行遍历
LAMBDA(s, t,
LET(
i, DROP(
REDUCE(
"",
TEXTSPLIT(t, , ",", 1),#将字符串进行分行
LAMBDA(x, y,
LET(
m, TAKE(
TEXTSPLIT(#将字符串再次分列
y,
TEXTSPLIT(
y,
VSTACK(
SEQUENCE(10) - 1,
"/"
),
,
1
),
,
1
),
,
1
),
VSTACK(
x,
HSTACK(m, TEXTSPLIT(y, m, , 1))#形成日期与内容的对应二维表
)
)
)
),
1
),
j, MONTH(C1:BJ1) & "/" & DAY(C1:BJ1) & " ",#将日期变为与i对应的文本格式,加空格以区分单数日双数日
VSTACK(
s,
MAP(
SEQUENCE(, COLUMNS(C1:BJ1)),
LAMBDA(a,
LET(
b, IF(
ISNUMBER(
FIND(INDEX(i, , 1) & " ", j)#与日期匹配形成几列数据
),
INDEX(i, , 2),
""
),
TEXTJOIN("", 1, INDEX(b, , a))#将几列数据合并成一列
)
)
)
)
)
)
),
1
) |