👋 Welcome! Introduce yourself and connect with your peers in Education to receive your industry badge.
CONTAINS to count cells with specific string of numbers
Is there a way to use COUNTIFS and CONTAINS to count cells that include a specific string of numbers as well as cells that include that string plus something else?
In the example below, I'm trying to count the number of students who are taking the course with the Code "20659," which should include those taking only that course (Student D and E) and those taking that course plus something else (Student C and F). Thus, the 4 students highlighted in purple. I tried the following formula, but it yields only 2:
=COUNTIFS(Code1:Code8, CONTAINS("20659", @cell))
If I could simply search for all students taking "LEAD 731," a comparable formula works like a charm: =COUNTIFS(Course1:Course8, CONTAINS("LEAD 731", @cell)) . However, I need a way to count students in LEAD 731 with Code "20659" separately from those in LEAD 731 with Code "21111."
Any brilliant ideas?
Best Answer
-
Try inserting a helper column and use
=Code@row + ""
(plus quote quote)
Then reference this helper column in your COUNTIFS.
Answers
-
Try inserting a helper column and use
=Code@row + ""
(plus quote quote)
Then reference this helper column in your COUNTIFS.
-
I do believe this will work. Thank you, Paul!
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives