Notifications
Mark all as read
Q&A

Query to rearrange data

+0
−1

In a sheet named Secondary Christina Armstrong had this data:

Sample input

and asked Docs Editors Help whether, in a different sheet, each Name associated with each school could be listed under columns already each labelled from ColumnA with a different school name.

Can this be achieved quite simply?

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comments

1 answer

+0
−0

I think so. Add an additional column at the right on Sheet Secondary and in K2 and copied down enter:

=textjoin("|",1,B2:J2)

Stringing together all possible schools for each name so they are all in a single column simplifies the next step.

In your other sheet, in A2 and copied across to suit:

=query(Secondary!$A:$K,"select A where K contains '"&A$1&"'") 

Because of formatting, it would probably be advisable to check the number of schools on Sheet Secondary matches the number of Names on the other sheet.

TEXTJOIN

QUERY

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comments

Sign up to answer this question »