SOLVED

Change the layout of my data

%3CLINGO-SUB%20id%3D%22lingo-sub-2847897%22%20slang%3D%22en-US%22%3EChange%20the%20layout%20of%20my%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2847897%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20to%20change%20the%20layout%20of%20my%20data%20%3CEM%3Efrom%3C%2FEM%3E%20the%20course%20data%20for%20each%20student%20ID%20showing%20up%20in%20rows%20%3CEM%3Eto%3C%2FEM%3E%20course%20data%20being%20listed%20at%20the%20top%20in%20column%20headers%20and%20student%20IDs%20below.%20Sample%20file%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20do%20I%20do%20that%3F%3C%2FP%3E%3CH2%20id%3D%22toc-hId--324648051%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%20id%3D%22toc-hId--324648049%22%3EChange%20From%3C%2FH2%3E%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E%3CSTRONG%3EStudent%20ID%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E%3CSTRONG%3ECourse%201%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E%3CSTRONG%3ECourse%202%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E%3CSTRONG%3ECourse%203%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20FA2%20MBA%20504%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20FA2%20MBA%20562%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2022%20SP1%20MBA%20514%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E3%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20FA1%20BAN%20500%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20FA2%20MIS%20592%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2022%20SP1%20BAN%20501%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E4%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20SU1%20MBA%20516%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20SU2%20MBA%20504%3C%2FTD%3E%3CTD%20width%3D%2225%25%22%20height%3D%2230px%22%3E2021%20FA1%20MBA%20508%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CH2%20id%3D%22toc-hId--2132102514%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%20id%3D%22toc-hId--2132102512%22%3EChange%20To%3C%2FH2%3E%3CTABLE%20border%3D%221%22%20width%3D%2299.82768120072195%25%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2224.931129476584022%25%22%3E%3CSTRONG%3E2021%20FA1%20MBA%20508%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%3E%3CSTRONG%3E2022%20SP2%20MIS%20503%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%3E%3CSTRONG%3E2023%20SP1%20MBA%20532%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%3E%3CSTRONG%3E2024%20SP1%20MBA%20516%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2224.931129476584022%25%22%20height%3D%2230px%22%3E6%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E51%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E66%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E151%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2224.931129476584022%25%22%20height%3D%2230px%22%3E10%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E54%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E67%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E36%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2224.931129476584022%25%22%20height%3D%2230px%22%3E%3CP%3E13%3C%2FP%3E%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E58%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E74%3C%2FTD%3E%3CTD%20width%3D%2224.96551724137931%25%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%20are%20greatly%20appreciated%2C%3C%2FP%3E%3CP%3EAshley%20Adams%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pexels-rodolfo-clix-1036936.jpg%22%20style%3D%22width%3A%20200px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317515iCD4023DD301D0EFF%2Fimage-size%2Fsmall%3Fv%3Dv2%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22pexels-rodolfo-clix-1036936.jpg%22%20alt%3D%22pexels-rodolfo-clix-1036936.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2847897%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2848117%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20layout%20of%20my%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2848117%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383741%22%20target%3D%22_blank%22%3E%40ashleyb_adams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20suggest%20to%20add%20an%20additional%20sheet2%20and%20enter%20the%20unique%20course%20descriptions%20in%20range%20A1%3AA900%20(if%20there%20are%20900%20descriptions%20altogether).%3C%2FP%3E%3CP%3EThen%20you%20can%20enter%20below%20formula%20in%20A2%20and%20fill%20over%20to%20A900%3A%3C%2FP%3E%3CP%3E%3DFILTER(sheet1!%24A%243%3A%24A%24153%3B(sheet1!%24C%243%3A%24C%24153%3Dsheet2!B1)%2B(sheet1!%24D%243%3A%24D%24153%3Dsheet2!B1)%2B(sheet1!%24E%243%3A%24E%24153%3Dsheet2!B1))%3C%2FP%3E%3CP%3EFormula%20so%20far%20covers%20range%20for%20course1%2C%20course2%20and%20course3%20which%20is%20column%20C%2C%20D%20and%20E%20in%20sheet1%20but%20can%20easily%20be%20adapted%20to%20the%20remaining%20columns%20F%20to%20Q.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2848137%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20layout%20of%20my%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2848137%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383741%22%20target%3D%22_blank%22%3E%40ashleyb_adams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20suggest%20to%20add%20an%20additional%20sheet2%20and%20enter%20the%20unique%20course%20descriptions%20in%20range%20A1%3ADJ1%20(if%20there%20are%20114%20descriptions%20altogether).%3C%2FP%3E%3CP%3EThen%20you%20can%20enter%20below%20formula%20in%20A2%20and%20fill%20over%20to%20DJ2%3A%3C%2FP%3E%3CP%3E%3DFILTER(sheet1!%24A%243%3A%24A%24153%3B(sheet1!%24C%243%3A%24C%24153%3Dsheet2!A1)%2B(sheet1!%24D%243%3A%24D%24153%3Dsheet2!A1)%2B(sheet1!%24E%243%3A%24E%24153%3Dsheet2!A1)%2B(sheet1!%24F%243%3A%24F%24153%3Dsheet2!A1)%2B(sheet1!%24G%243%3A%24G%24153%3Dsheet2!A1))%3C%2FP%3E%3CP%3EFormula%20so%20far%20covers%20range%20for%20course1%2C%20course2%20%2C%20course3%2C%20course4%20and%20course5%20which%20is%20column%20C%2C%20D%2C%20E%2C%20F%20and%20G%20in%20sheet1%20but%20can%20easily%20be%20adapted%20to%20the%20remaining%20columns%20H%20to%20Q.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2848358%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20layout%20of%20my%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2848358%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383741%22%20target%3D%22_blank%22%3E%40ashleyb_adams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESomething%20like%20this%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yea_So_0-1634255758834.png%22%20style%3D%22width%3A%20680px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317565iB08F8A717CE27AA1%2Fimage-dimensions%2F680x427%3Fv%3Dv2%22%20width%3D%22680%22%20height%3D%22427%22%20role%3D%22button%22%20title%3D%22Yea_So_0-1634255758834.png%22%20alt%3D%22Yea_So_0-1634255758834.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Echeers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2848483%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20layout%20of%20my%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2848483%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383741%22%20target%3D%22_blank%22%3E%40ashleyb_adams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExcel%20365%20Pro%20Plus%20with%20Power%20Pivot%20and%20Power%20Query.%3C%2FP%3E%3CP%3EUnPivot%20with%20PQ%2C%20Pivot%20with%20PP.%3C%2FP%3E%3CP%3ENo%20formulas%2C%20no%20VBA%20macro.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.mediafire.com%2Ffile%2Fm23xqu49nw3ovda%2F10_14_21.xlsx%2Ffile%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.mediafire.com%2Ffile%2Fm23xqu49nw3ovda%2F10_14_21.xlsx%2Ffile%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.mediafire.com%2Ffile%2Fdkusye8d228owr9%2F10_14_21.pdf%2Ffile%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.mediafire.com%2Ffile%2Fdkusye8d228owr9%2F10_14_21.pdf%2Ffile%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2848784%22%20slang%3D%22en-US%22%3ERe%3A%20Change%20the%20layout%20of%20my%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2848784%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383741%22%20target%3D%22_blank%22%3E%40ashleyb_adams%3C%2FA%3E%26nbsp%3BPowerQuery%20would%20be%20the%20easiest%20way%20out%20here.%20But%2C%20what%20you%20ask%20for%20will%20create%20a%20table%20with%2045%20rows%20and%20218%20columns%2C%20similar%20to%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1174419%22%20target%3D%22_blank%22%3E%40Quadruple_Pawn%3C%2FA%3E%26nbsp%3B's%20formula%20based%20solution.%20Personally%2C%20I%20would%20prefer%20the%20table%20with%20the%20Course%20names%20down%20one%20column%20(i.e.%20218%20rows)%20and%20the%2045%20columns%20with%20student%20ID's.%20But%2C%20that's%20up%20to%20you%2C%20of%20course.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20attached%20file%20contains%20both%20options.%20The%20queries%20are%20static%20and%20run%20off%20the%20dataset%20in%20your%20file.%20For%20now%2C%20it%20will%20not%20work%20if%20you%20add%20students%20or%20courses%20to%20the%20data%2C%20but%20with%20a%20few%20extra%20steps%20it%20can%20be%20made%20dynamic.%20Just%20didn't%20go%20all%20the%20way.%20This%20is%20just%20an%20example%20of%20what's%20possible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20the%20way%2C%20I%20deleted%20the%20hidden%20sheets%20from%20your%20original%20file.%20They%20included%20links%20to%20other%20workbooks%20that%20disturbed%20matters%20quite%20a%20bit%20when%20opening%20and%20saving%20the%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I would like to change the layout of my data from the course data for each student ID showing up in rows to course data being listed at the top in column headers and student IDs below. Sample file attached.

 

How do I do that?

Change From

Student IDCourse 1Course 2Course 3
22021 FA2 MBA 5042021 FA2 MBA 5622022 SP1 MBA 514
32021 FA1 BAN 5002021 FA2 MIS 5922022 SP1 BAN 501
42021 SU1 MBA 5162021 SU2 MBA 5042021 FA1 MBA 508

Change To

2021 FA1 MBA 5082022 SP2 MIS 5032023 SP1 MBA 5322024 SP1 MBA 516
65166151
10546736

13

5874 

 

Any ideas are greatly appreciated,

Ashley Adams

pexels-rodolfo-clix-1036936.jpg

16 Replies
best response confirmed by ashleyb_adams (Occasional Contributor)
Solution

@ashleyb_adams 

I suggest to add an additional sheet2 and enter the unique course descriptions in range A1:DJ1 (if there are 114 descriptions altogether).

Then you can enter below formula in A2 and fill over to DJ2:

=FILTER(sheet1!$A$3:$A$153;(sheet1!$C$3:$C$153=sheet2!A1)+(sheet1!$D$3:$D$153=sheet2!A1)+(sheet1!$E$3:$E$153=sheet2!A1)+(sheet1!$F$3:$F$153=sheet2!A1)+(sheet1!$G$3:$G$153=sheet2!A1))

Formula so far covers range for course1, course2 , course3, course4 and course5 which is column C, D, E, F and G in sheet1 but can easily be adapted to the remaining columns H to Q.

.

 

 

@ashleyb_adams 

Excel 365 Pro Plus with Power Pivot and Power Query.

UnPivot with PQ, Pivot with PP.

No formulas, no VBA macro.

https://www.mediafire.com/file/m23xqu49nw3ovda/10_14_21.xlsx/file

https://www.mediafire.com/file/dkusye8d228owr9/10_14_21.pdf/file

 

@ashleyb_adams PowerQuery would be the easiest way out here. But, what you ask for will create a table with 45 rows and 218 columns, similar to @Quadruple_Pawn 's formula based solution. Personally, I would prefer the table with the Course names down one column (i.e. 218 rows) and the 45 columns with student ID's. But, that's up to you, of course.

 

The attached file contains both options. The queries are static and run off the dataset in your file. For now, it will not work if you add students or courses to the data, but with a few extra steps it can be made dynamic. Just didn't go all the way. This is just an example of what's possible.

 

By the way, I deleted the hidden sheets from your original file. They included links to other workbooks that disturbed matters quite a bit when opening and saving the file.

The next step in the process is data entry into a registration system. From the preview, it looks like we would need the blank cells removed.
The graduate school coordinator and I feel confident we can do this solution. May we post replies if we have questions?
3 steps to success? This seems great! Could you provide a preview of the file? As a university employee, I have to be careful about downloading files from the internet.
I have not been able to get this solution out of my head. It's brilliant! Change the column headers to student IDs and rows to course names.

However, our business school is growing exponentially. Therefore, the number of students in the program may one day outnumber the number of courses.

@ashleyb_adams Fair enough! But even when you will have 1000 students and 500 courses, I guess it's unlikely that any given course will have more than 500 students. In your own example with 152 student, the most popular course had 45 participants. That's why I proposed the alternative (vertical) lay-out. Changing column names takes a few seconds and making it fully dynamic, perhaps a few minutes. 

Good point! It's safe to say @Quadruple_Pawn had the best answer to my question, but @Riny_van_Eekelen your addition is the Best Upgrade.

@ashleyb_adams 

You are welcome to post replies if you have questions. I’m glad my suggestion helped.

@Quadruple_Pawn I have been playing with this today and I am struggling. I keep receiving the below error. Thoughts?

ncarabelli_0-1635260213860.png

 

@ncarabelli 

Most probably you shall use commas instead of semicolons and like. Usual issue if don't have Excel file with formula.

Hi. We have been trying so hard to utilize your formula you posted so we can do multiple columns at a time but when we add in the plus signs we get a calc error. Below is the list of column formulas, any suggestions on how to combine them?
=FILTER(Students!A:D,Students!F:F="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!G:G="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!H:H="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!I:I="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!J:J="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!K:K="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!L:L="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!M:M="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!N:N="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!O:O="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!P:P="2022 SP1 MBA 504")
=FILTER(Students!A:D,Students!Q:Q="2022 SP1 MBA 504")

@ncarabelli 

Use exact ranges, better tables or at least dynamic ranges

=FILTER(Students!A1:D10000,Students!F1:F10000="2022 SP1 MBA 504")

@ncarabelli 

=FILTER(Students!A:D,(Students!C:C="2022 SP1 MBA 504")+

(Students!D:D="2022 SP1 MBA 504")+

(Students!E:E="2022 SP1 MBA 504")+

(Students!F:F="2022 SP1 MBA 504")+

(Students!G:G="2022 SP1 MBA 504")+

(Students!H:H="2022 SP1 MBA 504")+

(Students!I:I="2022 SP1 MBA 504")+

(Students!J:J="2022 SP1 MBA 504")+

(Students!K:K="2022 SP1 MBA 504")+

(Students!L:L="2022 SP1 MBA 504")+

(Students!M:M="2022 SP1 MBA 504")+

(Students!N:N="2022 SP1 MBA 504")+

(Students!O:O="2022 SP1 MBA 504")+

(Students!P:P="2022 SP1 MBA 504")+

(Students!Q:Q="2022 SP1 MBA 504"))

 

Above formula works fine in my spreadsheet. If you only want the IDs to be returned, replace " Students!A:D " by " Students!A:A " .

 

=FILTER(Students!A:D,Students!G:G="2022 SP1 MBA 504")

This formula for example returns a calc error because course name 2022 SP1 MBA 504 doesn't exist in sheet Students in Column G (Course 5).