如何从Google表格的所有标签页中提取匹配的数据?

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

How to pull data matching from all tabs in the google sheet?

问题

I have an spreadsheets with 50+ tabs. I would like to pull data match by keyword as sheet name & row number from all tabs.
有一个包含50多个标签的电子表格。我想要根据关键词从所有标签的表名和行号中提取数据。

It's possible by query with specific tab name, but when there is lot of tabs, how to recall from all tabs instated to re-write all tab names in query?
可以通过使用特定标签名称的查询来实现,但当有很多标签时,如何从所有标签中检索,而不是在查询中重写所有标签名称?

Worksheet demo:【工作表演示:】(https://docs.google.com/spreadsheets/d/1eQLiCTXbMfjWO-6_lRGNnQHTg2mtj_dDwpjaAGgrT7w/edit?usp=sharing)

英文:

I have an spreadsheets with 50+ tabs. I would like to pull data match by keyword as sheet name & row number from all tabs.

It's possible by query with specific tab name, but when there is lot of tabs, how to recall from all tabs instated to re-write all tab names in query?

如何从Google表格的所有标签页中提取匹配的数据?

Worksheet demo:

答案1

得分: 1

更新后的解决方案:

=let(Δ,arrayformula(split(tocol(reduce(wraprows(,columns(A:Z),),to_text(tocol(B3:B,1)),lambda(a,c,{a;let(Σ,indirect("'"&c&"'!A:Z"),if(len(Σ),Σ&"|"&substitute(c,"-","🐠")&"|"&row(Σ),))})),1),"|")),
         Ξ,let(Γ,wraprows(,3,),reduce(Γ,sequence(index(match(2,1/(A3:A<>"")))),lambda(a,c,{a;ifna(filter(Δ,index(Δ,,1)=index(A3:A,c)),Γ)}))),
         unique(filter(substitute(Ξ,"🐠","-"),index(Ξ,,1)<>"")))

如何从Google表格的所有标签页中提取匹配的数据?

英文:

Updated Solution:

=let(Δ,arrayformula(split(tocol(reduce(wraprows(,columns(A:Z),),to_text(tocol(B3:B,1)),lambda(a,c,{a;let(Σ,indirect("'"&c&"'!A:Z"),if(len(Σ),Σ&"|"&substitute(c,"-","🐠")&"|"&row(Σ),))})),1),"|")),
         Ξ,let(Γ,wraprows(,3,),reduce(Γ,sequence(index(match(2,1/(A3:A<>"")))),lambda(a,c,{a;ifna(filter(Δ,index(Δ,,1)=index(A3:A,c)),Γ)}))),
         unique(filter(substitute(Ξ,"🐠","-"),index(Ξ,,1)<>"")))

如何从Google表格的所有标签页中提取匹配的数据?

huangapple
  • 本文由 发表于 2023年4月13日 15:27:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76002730.html
匿名

发表评论

匿名网友

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

确定