Need Validation type drop-down wildcard in Sumproduct

megnin

Active Member
Joined
Feb 27, 2002
Messages
340
I have a worksheet report that counts question answers filtered by facility, date range and case manager. I use Data Validation "List" criteria to make the in-cell drop-down lists for the criteria of the variable values. For most of them the selected value works fine, but for the case manager drop-down I need a value in the list, other than the peoples names, to represent "All" or be a wildcard and include all values in the selection.

Here is the formula:

Code:
=SUMPRODUCT(--(WTP!$P$2:$P$420='WTP Report'!F$4),--(WTP!$I$2:$I$420='WTP Report'!$I$1),--(WTP!$M$2:$M$420='WTP Report'!$M$2),--(OFFSET(WTP!$A$2:$A$420,0,MATCH($Q6,WTP!$1:$1,FALSE)-1)=E$5)*1)

Here is the piece of concern from the above formula:

Code:
(WTP!$M$2:$M$420='WTP Report'!$M$2)
WTP Report!$M$2 is where the drop-down list is located. It gets it's list from a range containing a bunch of peoples names. Say, $AA$2:$AA$32
WTP!$M$2:$M$420 is where the names from the records in the database are stored.

I'd like to be able to stick some value like % or * or "%*%" in the list of names that would act like a "All" wildcard. I tried those, they don't work. ;)

Thanks in advance.
(Please don't just inform me that I can't use a wildcard in a sumproduct, I'm looking for a solution to a problem.)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
If you add "All" to the dropdown you could change the formula like this:

=SUMPRODUCT(--(WTP!$P$2:$P$420='WTP Report'!F$4),--(WTP!$I$2:$I$420='WTP Report'!$I$1),--(('WTP Report'!$M$2="All)+(WTP!$M$2:$M$420='WTP Report'!$M$2)>0),--(OFFSET(WTP!$A$2:$A$420,0,MATCH($Q6,WTP!$1:$1,FALSE)-1)=E$5)*1)

Edit: if you want the dropdown to include an asterisk * then that will work OK too, just replace "All" in the formula with "*"
 
Upvote 0

Forum statistics

Threads
1,215,422
Messages
6,124,808
Members
449,191
Latest member
rscraig11

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