How do I return a value of a cell based on a condition?

I am looking to return a value of a semester (i.e. Spring2020) from a particular cell in another sheet, for a particular student ID (i.e. 55555) taking a particular course (i.e. 6000)
I used this formula to count how many courses student is taking, and that gives me a number
=COUNTIFS({coursenumber}, "6000", {studentid}, "5555")
I need something like this
=IF(CONTAINS({coursenumber},"6000",{studentid},"5555"),{semester})
Answers
-
Hi @gwson
You could use a JOIN(COLLECT formula for this, even though you don't have values to Join (you'll just be returning one cell, assuming that only one value meets all the criteria).
Try this:
=JOIN(COLLECT({Semester Range}, {Course Number}, [Course Number]@row, {Student ID}, [Student ID]@row))
This is assuming you have a sheet with the Course Number and Student ID listed, so you don't have to create a new formula for each individual student and course. Otherwise one example formula would be as follows:
=JOIN(COLLECT({Semester Range}, {Course Number}, "6000" {Student ID}, "5555"))
Let me know if this works for you!
-Genevieve
Need more information? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao!👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.1K Get Help
- 430 Global Discussions
- 149 Industry Talk
- 488 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 154 Just for fun
- 74 Community Job Board
- 499 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!