在找到搜索关键字的 sheet 和 return 列中搜索一系列列

Search a range of columns in a sheet and return the Column header where the search key was found

我目前正在进行关键字研究,其中包含 24,000 个关键字。现在,我已经在“Sheet A”中按列对关键字进行了分组,其中第一行是集群名称。

现在,我想要做的是找到一种快速且自动化的方法来搜索“Sheet A”中的列,并拉出 header 行,其中集群名称是每个人的“Sheet B”中列出的关键字。

我有这个

但它 returns 一个 #value 错误说:

"Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "m "" at line 1, column 26. Was expecting one of: "group" ... "pivot" ... "order" ... "skipping" ... "limit" ... "offset" ... "label" ... "format" ... "options" ... "and" ... "or" ..."

此外,加载 24,000 个数据单元的所有查询 fxns 似乎需要很长时间,因此效率很低。任何帮助将非常感激。提前致谢!

在 D1 尝试:

={"Cluster"; ARRAYFORMULA(IFNA(VLOOKUP(C2:C, 
 SPLIT(QUERY(FLATTEN(IF(INDIRECT("Clusters!C2:"&ROWS(Clusters!A:A))="",,
 INDIRECT("Clusters!C2:"&ROWS(Clusters!A:A))&"♠"&Clusters!C1:1)), 
 "where Col1 is not null"), "♠"), 2, 0)))}