Lambda函数帮助 – 根据Google表格中的多单元格搜索显示数据

huangapple go评论72阅读模式
英文:

Lambda function help – showing data based on multi-cell search in google sheets

问题

我有一个谷歌表格,每个月都有一个选项卡。在每个月中,我可以选择一个数字(-2,-1,0,1,2),并为每一天添加一个文本注释。

所有选项卡中所有日期的数字和文本注释都显示在“Entries”页面上。

问题:
如果我为某一天添加了文本注释,但没有给它一个数字,那么文本注释将显示在条目选项卡中错误的行。你可以在这里看到:https://www.loom.com/share/5802a113dc184115b75cd085d7325384?sid=cea8938c-4df5-448a-9279-977f986ccb43

这是表格链接:
https://docs.google.com/spreadsheets/d/1dUEKXSCCohBIV_hg6k6c8mwXEXcQEQ6ADBcwBKMb1LE/edit?usp=sharing

有人可以帮我更新我的lambda函数吗?

我对这个文件还有更多问题,但在这里将范围限制在一个问题上。

谢谢。

英文:

I have a google sheet with one tab for each month. Within each month, I can select a number (-2, -1, 0, 1, 2) and add a text note for each day.

The numbers and text notes from all days in all tabs show up on the "Entries" page.

Issue:
If I have added a text note for a given day, but haven't given it a number, the text note shows in the wrong row in the entries tab. You can see it here: https://www.loom.com/share/5802a113dc184115b75cd085d7325384?sid=cea8938c-4df5-448a-9279-977f986ccb43

And here's the sheet:
https://docs.google.com/spreadsheets/d/1dUEKXSCCohBIV_hg6k6c8mwXEXcQEQ6ADBcwBKMb1LE/edit?usp=sharing

Can anyone help me update my lambda function?

I have more questions about this file, but will limit the scope here to a single question.

Thank you

答案1

得分: 1

这是一种方法,你可以尝试一下:

=let(Σ,indirect(A1&"!B4:AC26"),
     Λ,reduce(tocol(,1),sequence(6,1,1,4),lambda(a,c,vstack(a,
       reduce(tocol(,1),sequence(7,1,1,4),lambda(x,y,vstack(x,hstack(index(Σ,c,y),index(Σ,c,y+3),index(Σ,c+1,y),index(Σ,c+2,y)))))))),
     map(A2:A,lambda(Σ,ifna(index(vlookup(Σ,Λ,{2,3,4},))))))

Lambda函数帮助 – 根据Google表格中的多单元格搜索显示数据

英文:

<!-- language-all: js -->

Here's one approach you may test out:

=let(Σ,indirect(A1&amp;&quot;!B4:AC26&quot;),
     Λ,reduce(tocol(,1),sequence(6,1,1,4),lambda(a,c,vstack(a,
       reduce(tocol(,1),sequence(7,1,1,4),lambda(x,y,vstack(x,hstack(index(Σ,c,y),index(Σ,c,y+3),index(Σ,c+1,y),index(Σ,c+2,y)))))))),
     map(A2:A,lambda(Σ,ifna(index(vlookup(Σ,Λ,{2,3,4},))))))

Lambda函数帮助 – 根据Google表格中的多单元格搜索显示数据

huangapple
  • 本文由 发表于 2023年8月9日 05:54:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76863425.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定