Forum Discussion
Join 2 COUNTIF to become 1 COUNTIFS
- Dec 21, 2023
Can you give an example of what you would want to be returned?
For instance, would you ask how many '456' exist in columns for 21-dec-2023? The answer would be 2.
Would there really by duplicate dates in row 1?
Which Excel version are you using?
Perhaps something like this:
In the example i used dates but in reality it will be week numbers therefor there might be duplicates
what i'm looking for is indeed how many "456" exist in a column, for example for column 22/12/2023 i want excel to tell me that there is 3 instances of "456"
glennmckenna I added a screenshot to my previous post, perhaps just after you read it. It that what you wanted?
- SergeiBaklanJan 29, 2024Diamond Contributor
Back to previous sample it could be
=SUMPRODUCT( --ISNUMBER( SEARCH(B13,A2:D9) )*(A1:D1=A14) ) - glennmckennaJan 29, 2024Copper Contributor
Hello, i've just realised that i missed info in my initial question.
in reality the cells might not contain only "123" or "456" but they might contain for example "123 xyz"
is there a way to get this to work from a point when the cell contains the right info (adding stars for example "*123*" doesn't work) ? - Riny_van_EekelenDec 21, 2023Platinum Contributor
glennmckenna Glad we figured it out.
- glennmckennaDec 21, 2023Copper ContributorMany thanks, that is exactly what i was after
- Riny_van_EekelenDec 21, 2023Platinum Contributor
glennmckenna You can't use a reference to the entire row 3. You should limit it to columns K to ZZ
- glennmckennaDec 21, 2023Copper ContributorThat was indeed the case, iv'e got it to work in the example that we've shared it looks like it's what i'm after
however when i try it in the real excel i get #N/A
here is the function
=SOMME((OIL!3:3=KPI!A2)*(OIL!K4:ZZ300=KPI!F$1))