Forum

Notifications
Clear all

[Solved] Countifs

13 Posts
2 Users
0 Reactions
174 Views
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 

=COUNTIFS(Y12,">1",Z13, ">1",AA14, ">1",AB15, ">1")

This doesn't count the number of cells that show number's that are 1 or greater than 1, just shows '0'.

Countifs#

How do I adjust it.

 
Posted : 02/04/2025 7:19 pm
Riny van Eekelen
(@riny)
Posts: 1185
Member Moderator
 

COUNTIFS works like multiple AND functions. One you your (single cell) criteria ranges contains a 0 and another a 1. Therefore, the result is 0. Only when all cells contain a number greater than 1 the result will be 1.

But you want to count the number of times that the value is greater than or equal to 1. So that would require a >0 or >=1. But you can't use a single COUNTIFS or COUNTIF. You would need to sum 4 COUNTIF formulas. One for each cell.

Alternatively, if the pattern is always 4 cells on a diagonal (top left to bottom right) you could do something as demonstrated in the attached file.

 

 
Posted : 02/04/2025 10:26 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 

Perfect thank you.

This is beyond my capabilities but, maybe sometime in the future when time is on my side.

 

Best regards,  Dave.

 
Posted : 03/04/2025 5:44 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 

I have typed this formula into my Excel sheet and it returns #NAME? or #VALUE! not 3.

Regards,  Dave.

 
Posted : 04/04/2025 3:56 am
Riny van Eekelen
(@riny)
Posts: 1185
Member Moderator
 

@alwaysdave Which formula? Can you attach your file?

 
Posted : 04/04/2025 2:27 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 
Pattern
Pattern#
 
Posted : 04/04/2025 6:15 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 
AlwaysDave
AlwaysDave#
 
Posted : 04/04/2025 6:18 pm
Riny van Eekelen
(@riny)
Posts: 1185
Member Moderator
 

Did you name the matrix with the 1's and 0's "pattern"?

Otherwise replace the word pattern in the formula with the range reference of the matrix.

 

 

 
Posted : 04/04/2025 6:20 pm
Riny van Eekelen
(@riny)
Posts: 1185
Member Moderator
 

@alwaysdave Which Excel version do you work with?

 
Posted : 04/04/2025 6:21 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 

@riny Office 2010.

 
Posted : 04/04/2025 6:58 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 

@riny You are going to have to show me, I've tried but you are a lot more advanced than I will ever be.

This post was modified 2 weeks ago by AlwaysDave
 
Posted : 04/04/2025 7:00 pm
Riny van Eekelen
(@riny)
Posts: 1185
Member Moderator
 

@alwaysdave Oh my! That's ancient. Don't really recall how limited that version was compared to modern Excel.

Let stick to a simple solution then. Try this:

=(--Y11>0)+(--Z12>0)+(--AA13>0)+(--AB14>0)

image

 

 

 
Posted : 04/04/2025 7:16 pm
(@alwaysdave)
Posts: 8
Active Member
Topic starter
 

Works perfectly, thank you.

 
Posted : 05/04/2025 1:02 am
Share: