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.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!