SUMPRODUCT COUNTIFS multiple columns with multiple criteria held in a dynamic list

leearmitage

New Member
Joined
May 14, 2014
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
I have the following formula which works correctly. It counts the number of times the word "error" is found in column A when column B is equal to a particular date held in cell $D$2, and Column C is equal to any value in a table called lu_tbl_branch. That table is dynamic, so sometimes it may have 1 entry, other times it could be 30 or more (so I can't hard code the values)

=SUMPRODUCT(COUNTIFS(
loading_Appended_Source[Column A],"*error*",
loading_Appended_Source[Column B],D$2,
loading_Appended_Source[Column C],lu_tbl_branch))


I would like to adjust the formula so that I can also refer to other dynamic tables (called lu_tbl_exec and lu_tbl_from). I've tried the following but no success, so hoping you can help me!


=SUMPRODUCT(COUNTIFS(
loading_Appended_Source[[Column A],"*error*",
loading_Appended_Source[[Column B],D$2,
loading_Appended_Source[[Column C],lu_tbl_branch,
loading_Appended_Source[[Column D],lu_tbl_exec,
loading_Appended_Source[[Column E],lu_tbl_from))
 
Yep, it did work when CSE entered, thanks!

Unfortunately though the array length is too long once the items in the table are transposed. So I think I may have to come up with a completely new solution, GETPIVOTDATA perhaps. I hate it when Excel beats me!
 
Upvote 0

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
Unfortunately though the array length is too long once the items in the table are transposed.
If I'm remember correctly, that means over 65636 rows of data in the transposed table. If all of the tables are of similar size then you could encounter problems whatever you try.

In theory, this should work, in reality it's likely to think about it for ages then give up.

=SUMPRODUCT(ISNUMBER(SEARCH("error",loading_Appended_Source[[Column A]))*
(loading_Appended_Source[[Column B]=D$2)*
ISNUMBER(SEARCH(loading_Appended_Source[[Column C],lu_tbl_branch))*
ISNUMBER(SEARCH(loading_Appended_Source[[Column D],lu_tbl_exec))*
ISNUMBER(SEARCH(loading_Appended_Source[[Column E],lu_tbl_from)))

Adding helper columns to the loading_Appended_Source table to reduce the workload of the formula might help, but it's still going to be a lot of processing.
vba might be a better option, but what you would need to achieve this is above my pay grade.
 
Upvote 0
Yeah, thanks for your time with this Jason, greatly appreciated. Think I'll have to go with a GETPIVOTDATA option with a bunch of slicers as will be quicker!
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

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