需要一个函数[单个或嵌套]来搜索单元格中的word1到word2并将output1显示到output10

问题描述 投票:0回答:1

我有一个谷歌表格,让孩子们问他们有什么可以带到现场,预期答案的格式就像我需要在C或D列中有一个公式,它会读取答案并放入游戏中名称。

[ column B ]
1 - i have a bat
2 - i have a bat and a ball
3 - i have a basketball 
4 - i have two footballs
5 - i have a rugby ball

[ Column D ]
1 - Cricket
2 - Cricket
3 - Basketball
4 - Football
5 - Rugby

我试图用IFsSEARCHREGEXMATCH完成这项工作,但没有成功。

google-sheets google-sheets-formula
1个回答
0
投票
=ARRAYFORMULA(PROPER(SUBSTITUTE(IFERROR(REGEXEXTRACT(B:B, 
 "bat|basketball|football|rugby")), 
 "bat", "cricket")))

0

© www.soinside.com 2019 - 2024. All rights reserved.