[英]Find name in one column, return value from another
I have a spreadsheet with responses from a Google Form.我有一个包含来自 Google 表单的回复的电子表格。 They sign up for one of our trivia games, then I make a spreadsheet for each game.他们注册了我们的一个琐事游戏,然后我为每个游戏制作了一个电子表格。 I wrote a FILTER function in the corresponding Google Sheet that gives me a list of all the players' names.我在相应的 Google 表格中写了一个 FILTER function,它给了我所有玩家姓名的列表。
What I need is a function to reference the team name from the Responses sheet and give me the information in my filtered game sheet.我需要一个 function 来引用响应表中的团队名称,并在过滤后的游戏表中给我信息。 I would like a function rather than a Javascript script to run manually.我希望手动运行 function 而不是 Javascript 脚本。 I am certain this can be done but the function methodology is escaping me.我确信这可以做到,但 function 方法是 escaping 我。
As an example, I have created a spreadsheet in Google Sheets with some data.例如,我在 Google 表格中创建了一个包含一些数据的电子表格。 Can someone help me write a formula to put team names in "The Office" tab?有人可以帮我写一个公式将团队名称放在“办公室”选项卡中吗? Thanks in advance.提前致谢。
https://docs.google.com/spreadsheets/d/1F2bgvHXqA2wNUa98rfESWTeK22va1RMQUjnk6ma2AeA/edit?usp=sharing https://docs.google.com/spreadsheets/d/1F2bgvHXqA2wNUa98rfESWTeK22va1RMQUjnk6ma2AeA/edit?usp=sharing
In B2 try this formula在 B2 中尝试这个公式
=ArrayFormula(if(len(A2:A), vlookup( match("*"&A2:A&"*", 'Form Responses'!C:C, 0), {row('Form Responses'!A:A), 'Form Responses'!B:B}, 2, 0),))
and see if that helps?看看这是否有帮助?
Looks like you need a VLOOKUP which grabs the value of the matching row of whatever criteria you specify.看起来您需要一个 VLOOKUP 来获取您指定的任何条件的匹配行的值。 The only issue was that VLOOKUP requires the column of values being returned to be after the "lookup column" which meant moving the team names column to column D.唯一的问题是 VLOOKUP 要求返回的值列位于“查找列”之后,这意味着将团队名称列移动到 D 列。
Here is the formula: =VLOOKUP("*"&A2&"*",'Form Responses':C$2,D$23,2, FALSE)
这是公式: =VLOOKUP("*"&A2&"*",'Form Responses':C$2,D$23,2, FALSE)
I also went ahead and implemented it in your linked spreadsheet.我还继续在您的链接电子表格中实现了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.