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 help? 👀 | 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
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!