I have text in a Google Spreadsheet that is the result of a query. In cell A2, I have a student's name. In cell B2, I have a list of all of their courses. For example, B2 may look like: English I Math I World History PE Photography 1 (one course per line, all in the same cell)
In column E, I have a list of the courses.
In column F, I need a list of all of the students that have that course in Column B. I need each list to be in one cell.
For example in E2, it would say English I. And in F2, it would read:
Student 1
Student 2
Student 3
(one cell, one student per line)
With this formula, I get a list of all students that have that course, but also any where it contains that course. =IFERROR(if(E2="","",(JOIN( char(10) , FILTER(A:A,search(E2,B:B))))))
So, it returns all the students taking English I, but also all the ones taking English II.
Is there anyway to make it exactly match English I and only English I?