我们可以使用 Excel 公式实现以下目标吗?公式的输出将是结果列

Can we achieve the following using an Excel formula? The output of the formula will be the Result column

Month Brand Product Result
January Apple Iphone Apple:Iphone,Ipad,Imac;Lenovo:Yoga,Thinkpad
January Apple Ipad Apple:Iphone,Ipad,Imac;Lenovo:Yoga,Thinkpad
January Apple Imac Apple:Iphone,Ipad,Imac;Lenovo:Yoga,Thinkpad
January Lenovo Yoga Apple:Iphone,Ipad,Imac;Lenovo:Yoga,Thinkpad
January Lenovo Thinkpad Apple:Iphone,Ipad,Imac;Lenovo:Yoga,Thinkpad
February Apple Imac Apple:Imac;Lenovo:Thinkpad
February Lenovo Thinkpad Apple:Imac;Lenovo:Thinkpad

在 D2 中输入:

=BYROW($A:$A,
    LAMBDA(a,
        LET(rng,a,
            mb,$A:$B,
            m,$A:$A,
            b,$B:$B,
            p,$C:$C,
            TEXTJOIN(";",,UNIQUE(
                 BYROW(FILTER(mb,m=rng),
                 LAMBDA(a,INDEX(a,,2)&":"&
                    TEXTJOIN(",",,FILTER(p,(m=INDEX(a,,1))*(b=INDEX(a,,2)))))))))))