Count if criteria in one column is met or criteria in another column is met

HadenSteward

New Member
Joined
Mar 14, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm so sorry if this has been answered but when I try to search for an answer I am really only finding the =COUNTIF(A2:A5,{"Red","Blue","Green"}) kind of answer, which isn't what I need.

I want to do something that gives me a count if a criteria is met in one column OR a criteria is met in another column. I know I can achieve this by creating another row in my data with an IF(OR( and then counting that new column, but I'd rather not do that if I don't have to.

So for this example, I want a count of rows where A column is less than 25 OR B column is less than 3. The result should be 4 because only row 5 fails to meet at least one of these criteria.
example.png


Appreciate any help on how to do this.

Thanks,

Haden Steward
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUM(SIGN((A1:A5<25)+(B1:B5<3)))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUM(SIGN((A1:A5<25)+(B1:B5<3)))
Hi, and thank you for welcoming me.
That seems to be giving me the result of 3 but I am looking for the result of 4 because in my example, there is at least one of the two criteria met for rows 1-4.

Thanks!
 

Attachments

  • example2.png
    example2.png
    6.2 KB · Views: 9
Upvote 0
You have > signs rather than < ;)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top