Shortening a long SUMPRODUCT/COUNTIF formula

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
886
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have the following formula:

="Open WorkOrders: "&SUMPRODUCT(COUNTIFS('WO Report'!$E:$E,"<>History",'WO Report'!$E:$E,"<>Consumables",'WO Report'!$E:$E,"<>Quarantine",'WO Report'!$E:$E,"<>R & D / Testing",'WO Report'!$E:$E,">""",'WO Report'!$S:$S,$B$12:$G$12))

I am looking to shorten it by referencing a range of cells for: History, Consumables, Quarantine and R&D / Testing. The Range of cells would be Z16:Z19.

Is there any way to do this?

Something like: ="Open WorkOrders: "&SUMPRODUCT(COUNTIFS('WO Report'!$E:$E,"<>Z16:Z19",'WO Report'!$E:$E,">""",'WO Report'!$S:$S,$B$12:$G$12)) Although I know this is not correct....
Maybe add Z20 as a blank to get rid of: 'WO Report'!$E:$E,">""" Section if possible??

Thank you very much to anyone who can help with this

Carla
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try:

="Open WorkOrders: "&SUMPRODUCT(COUNTIFS('WO Report'!$S:$S,$B$12:$G$12))-SUMPRODUCT(COUNTIFS('WO Report'!$S:$S,$B$12:$G$12,'WO Report'!$E:$E,$Z$16:$Z$20))

Put your values in Z16:Z19 and put an = sign in Z20. Also note that when using ranges in a COUNTIFS, you can only have 2, one horizontal ($B$12:$G$12) and one vertical ($Z$16:$Z$20).
 
Last edited:
Upvote 0
This is perfect! Thank you very much! And thank you for the tip! I did not know it can only have 2 ranges, a horizontal and a vertical.

Thank you again! :)

Carla
 
Upvote 0

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

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