Countif Functions with OR

Matis

New Member
Joined
Mar 25, 2002
Messages
27
In my spreadsheet I have two columns.
In One Column I have months, i.e January to December.
In Another column I have status, i.e Approved, Rejected, & Not Applicable.

I already have a formula that counts the status of each in one particular month. For example if I want to know how many were approved in january I use the formula

=SUMPRODUCT((A2:A100="January")*(B2:B100="Approved"))

I would like to know how to count using multiple criteria in a single cell. For example what will the formula be if I want to count how many were Approved OR Rejected in January. So the total will be a sum of the Approved and Rejected.

Thank you
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

twistinginthewind

Board Regular
Joined
Jun 25, 2003
Messages
119
I'm no expert on sumproduct... but how bout this...

=SUMPRODUCT((A2:A100="January")*(B2:B100="Approved"))+SUMPRODUCT((A2:A100="January")*(B2:B100="Rejected"))
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,375
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
=SUMPRODUCT((A2:A100="January")*(B2:B100={"Approved","Rejected"}))
should work too.
 
Upvote 0

Forum statistics

Threads
1,191,030
Messages
5,984,234
Members
439,879
Latest member
KingGoulash

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
Top