Jan 27, 2022

Return First Row where cell contains "YES"

I'm trying to compile a list of teachers that have recommended students for certain classes. We have a massive spreadsheet of teachers and their recommendations. I'd like to have a column that compiles a list of teachers that have said "YES" for a given student. See the sample sheet for an example and the desired result (yellow). Thanks in advance!
Locked
Informational notification.
This question is locked and replying has been disabled.
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Jan 27, 2022
Hi Benjamin,
 
Try something like this:
 
=iferror( join(", ", filter(E$1:$1, E2:2 = "Yes") ) )
 
See the new Solution sheet in your sample spreadsheet for an illustration.
 
Cheers --Hyde
Original Poster Benjamin Yergler marked this as an answer
Helpful?
Recommended Answer
Jan 27, 2022
Hi there,

I have proposed another solution that doesn't need to be dragged. You can see it in tab z cell D2:

=index(substitute(trim(flatten(query(transpose(if(E2:T16="",,E1:T1)),,9^9)))," ",", "))

I hope you find this helpful. :) 

z
Diamond Product Expert --Hyde recommended this
Helpful?
All Replies (3)
Recommended Answer
Jan 27, 2022
Hi Benjamin,
 
Try something like this:
 
=iferror( join(", ", filter(E$1:$1, E2:2 = "Yes") ) )
 
See the new Solution sheet in your sample spreadsheet for an illustration.
 
Cheers --Hyde
Original Poster Benjamin Yergler marked this as an answer
Jan 27, 2022
Thanks so much! That's a much simpler formula than I was thinking was needed! I came up with: 
=IFNA(Textjoin(", ",True,FILTER(ARRAYFORMULA(IF(G3:EP3 = "YES",G$1:EP$1,"")),Len(ARRAYFORMULA(IF(G3:EP3 = "YES",G$1:EP$1,"")))>1))), which seems to work also, but is much more cumbersome.

-Ben
Recommended Answer
Jan 27, 2022
Hi there,

I have proposed another solution that doesn't need to be dragged. You can see it in tab z cell D2:

=index(substitute(trim(flatten(query(transpose(if(E2:T16="",,E1:T1)),,9^9)))," ",", "))

I hope you find this helpful. :) 

z
Diamond Product Expert --Hyde recommended this
false
6020242245186244325
true
Search Help Center
true
true
true
true
true
35
false
false
Search
Clear search
Close search
Main menu