0
votes

I have a spreadsheet with responses from a Google Form. 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.

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. I would like a function rather than a Javascript script to run manually. I am certain this can be done but the function methodology is escaping me.

As an example, I have created a spreadsheet in Google Sheets with some data. 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

3
Okay everybody, thanks for all your responses. I also need a FILTER function because one person might sign up for multiple games. (I use the same Form for people to register for multiple themed trivia games.) I just added a few people to the Form Responses tab and broke the formula. Anyone want to give it another try?Dan Burgess
Hello @DanBurgess, what do you mean by "one person might sign up for multiple games"? How about using UNIQUE? Moreover, what is not working in your formula when you add the FILTER function?ale13

3 Answers

0
votes

In B2 try this formula

=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?

0
votes

Looks like you need a VLOOKUP which grabs the value of the matching row of whatever criteria you specify. 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.

Here is the formula: =VLOOKUP("*"&A2&"*",'Form Responses'!C$2:D$23,2, FALSE)

I also went ahead and implemented it in your linked spreadsheet.

0
votes

use in B2:

=ARRAYFORMULA(IF(A2:A="",,IFNA(VLOOKUP("*"&A2:A&"*", 'Form Responses'!C2:D, 2, 0))))

0