Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel formula 基于列值搜索文本,并将相邻行返回到单个单元格中_Excel Formula_Google Sheets_Formula_Spreadsheet - Fatal编程技术网

Excel formula 基于列值搜索文本,并将相邻行返回到单个单元格中

Excel formula 基于列值搜索文本,并将相邻行返回到单个单元格中,excel-formula,google-sheets,formula,spreadsheet,Excel Formula,Google Sheets,Formula,Spreadsheet,我需要一些谷歌表单公式的帮助 我的电子表格设置如下: 我需要的结果应该与G2中的结果类似: 如果E:E中的文本包含A:A中的任何值,则将B:B中的相应值返回到G:G中,并用逗号分隔(不区分大小写) 非常感谢 试试这个: =join(",",query(filter(A2:B4,arrayformula(regexmatch(LOWER($E$2),lower(A2:A4))),B2:B4),"select Col2")) 要返回数字或文本,请使用: =连接(“,”,查询(过滤器(A2:L4,

我需要一些谷歌表单公式的帮助

我的电子表格设置如下:

我需要的结果应该与G2中的结果类似:

如果E:E中的文本包含A:A中的任何值,则将B:B中的相应值返回到G:G中,并用逗号分隔(不区分大小写)

非常感谢

试试这个:

=join(",",query(filter(A2:B4,arrayformula(regexmatch(LOWER($E$2),lower(A2:A4))),B2:B4),"select Col2"))
要返回数字或文本,请使用:


=连接(“,”,查询(过滤器(A2:L4,数组公式(regexmatch(LOWER($E$2),LOWER(A2:A4))),“选择列2”))

太棒了!工作完美!非常感谢。嘿,多比!我一直在用这个公式计算数字,它工作得很好,但是,如果我用文本替换数字(例如香蕉的数字),它就不起作用了:(你知道我怎么做才能使公式用文本而不是数字工作吗?谢谢!@coala See addition to answer。