return如何在GoogleSheet中用逗号分隔多个数据?

How to return multiple data separated with comma in Google Sheet?

我有一个包含两个文件夹的 sheet:TeachersDiscipline.

我正在尝试使用以下函数在 Teacher.Discipline 单元格处获取 Discipline.ID :

                   =JOIN(",";FILTER(Discipline!A:A;Discipline!C:C=B2))

as you can see it in this sample spreadsheet.

问题是,它适用于只有一个 TeacherDisciplines,但是当我尝试过滤 Teacher.NameDiscipline.Teacher 有多个老师,return 是 Discipline.ID 当名称出现在逗号之前时,或者 return 如果名称在逗号之后(在 Discipline.Teacher 处),则为 NULL 值。

是否有任何函数可以 return 这些值而不会出现逗号问题? (需要具体在 Google Sheet)

在C2尝试

=JOIN(",";FILTER(Discipline!A:A; regexmatch(Discipline!C:C; B2)))

然后往下填。

希望对您有所帮助?