【问题标题】:Google Spreadsheet ArrayFormula + VLookup TransformationGoogle 电子表格 ArrayFormula + VLookup 转换
【发布时间】:2021-10-15 03:47:05
【问题描述】:

我在 Google 电子表格上有下表:

并且需要得到如下变换结果:

我准确地说,对于每种蔬菜,我只能有 1 个买入价和 1 个或多个卖出价

我很确定这可以结合 ArrayFormula() + Vlookup() 来实现,但到目前为止还没有找到正确的公式。欢迎任何帮助

提前致谢

干杯

约安

【问题讨论】:

    标签: google-sheets vlookup array-formulas flatten google-query-language


    【解决方案1】:

    尝试:

    =INDEX(SPLIT(FLATTEN(QUERY(TRANSPOSE(QUERY(QUERY(
     {A2:C, IF(B2:B="buy", CHAR(13)&C2:C, C2:C)}, 
     "select Col1,max(Col3) where Col1 is not null group by Col1 pivot Col4"), 
     "offset 1", 0)),,9^9)), " "))
    

    【讨论】:

    • 非常感谢 Player0,我没有想到这种方法,它适用于我的情况。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-24
    • 1970-01-01
    • 1970-01-01
    • 2016-07-02
    • 2018-10-17
    • 1970-01-01
    • 2015-11-29
    相关资源
    最近更新 更多