Shortening a long SUMPRODUCT/COUNTIF formula

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
871
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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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