Help with Counting for specific value within cells
I'm trying to get a count of the number of cells (within the column Card_StartDate) that have a date of less than 12/31/21, but only when an adjacent column (LaneTitle) has cells with content that contains 'Parent' (parent can be anywhere within those cells). I'm completely lost on this and can't find what I'm looing for in community.
I appreciate any help you can provide!
Here's what I have thus far, to start the formula (which is accurate):
=COUNTIF([Card_StartDate]:[Card_StartDate], "<=12/31/21")
Where I'm lost is trying to pull the count for only the data that has the word parent within.
=FIND("Parent", @cell) > 0
Best Answer
-
The CONTAINS function is what you need to look for text anywhere within a cell. It's not an exact match function and is not case sensitive.
=COUNTIFS([Card_StartDate]:[Card_StartDate], <=DATE(2021,12, 31), LaneTitle:LaneTitle, CONTAINS("Parent", @cell))
Answers
-
Hey @Brooke Clem
Try this
=COUNTIFS([Card_StartDate]:[Card_StartDate], <=12/31/21, LaneTitle:LaneTitle, "Parent")
cheers,
Kelly
-
Thank you for your help, but This gives me an #InvalidOperation.
=COUNTIFS([Card_StartDate]:[Card_StartDate], <=12/31/21, LaneTitle:LaneTitle, "Parent")
Also - "Parent" could be a word within the cell(s). I somehow need to pull data for the 'LaneTitle' column that contains "Parent" anywhere within each cell.
Does that help?
-
Hey Brooke
oops, my bad
=COUNTIFS([Card_StartDate]:[Card_StartDate], <=DATE(2021,12, 31), LaneTitle:LaneTitle, "Parent")
-
Thank you KDM! This is fantastic!
How do I change "Parent" to asking for cells that contain "Parent" anywhere within the cell(s), not just solely "Parent"?
-
The CONTAINS function is what you need to look for text anywhere within a cell. It's not an exact match function and is not case sensitive.
=COUNTIFS([Card_StartDate]:[Card_StartDate], <=DATE(2021,12, 31), LaneTitle:LaneTitle, CONTAINS("Parent", @cell))
-
This is PERFECTION! Thank you so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!