=SUMPRODUCT formula with three criteria help

redspanna

Well-known Member
Joined
Jul 27, 2005
Messages
1,602
Office Version
  1. 365
Platform
  1. Windows
Hi all

I would like a formula that will check thru range B4:B250 of the 'schedule' sheet for a match to the word "BELL", then count the occasions "M" and "M1" appear thru range C4:C250

I have a SUMPRODUCT formula that works for one of the criteria but unsure how to get it to count both 'M' and 'M1'

Code:
=SUMPRODUCT((Schedule!B4:B250="BELL")*(Schedule!C4:C250="M"))

any help appreciated
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
After some playing around (and extensive www searching) I got this to work...

Code:
=SUM(COUNTIFS(Schedule!C4:C250,{"M1","M"},Schedule!B4:B250,"Bell"))

:)
 
Upvote 0
Will there be other "M"'s? eg M2, M3 etc, or just M and M1?
If only M and M1....
=countifs(Schedule!B4:B250,"BELL",Schedule!C4:C250,"M?")


If more than just M1...
=SUM(COUNTIFs(Schedule!B4:B250,"BELL",Schedule!C4:C250,{"M", "M1"})

edit: cool, you got what you needed - almost the same as my suggestion :)
 
Last edited:
Upvote 0
Code:
=SUMPRODUCT(--(Schedule!B4:B250="BELL"),(Schedule!C4:C250="M")+(Schedule!C4:C250="M1"))
 
Upvote 0
use below mentioned formula

=SUMPRODUCT(--(J5:J10="apple"),--(K5:K10="m")+(K5:K10="m1"))

here "+" work as or operator
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

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