ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SUMPRODUCT Question (https://www.excelbanter.com/excel-worksheet-functions/159624-sumproduct-question.html)

porter444

SUMPRODUCT Question
 
Gurus,

I need a little help with a sumproduct function.

In my worksheet I have two fields that have data validation lists in them
that users will select a value from. This works just fine. The sumproduct
results change with their selections.

What I want to do, but don't know how, is to give a "all" choice when the
fields with the data validation lists are blank. In other words, if the user
doesn't choose an option in the field then they want to see all without a
filter.

My current formula is:
=SUMPRODUCT(
--(Schedule!$A$2:$A$9981=$A$8),
--(Schedule!$I$2:$I$9981=$A$9))

Thanks in advance.

Scott

Bob Phillips

SUMPRODUCT Question
 
=SUM(
(IF($A$8="",ROW(Schedule!$A$2:$A$99)^0,ISNUMBER(MA TCH(Schedule!$A$2:$A$99,$A$8,0))))*
(IF($A$9="",ROW(Schedule!$I$2:$I$99)^0,ISNUMBER(MA TCH(Schedule!$I$2:$I$99,$A$9,0)))))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"porter444" wrote in message
...
Gurus,

I need a little help with a sumproduct function.

In my worksheet I have two fields that have data validation lists in them
that users will select a value from. This works just fine. The
sumproduct
results change with their selections.

What I want to do, but don't know how, is to give a "all" choice when the
fields with the data validation lists are blank. In other words, if the
user
doesn't choose an option in the field then they want to see all without a
filter.

My current formula is:
=SUMPRODUCT(
--(Schedule!$A$2:$A$9981=$A$8),
--(Schedule!$I$2:$I$9981=$A$9))

Thanks in advance.

Scott




porter444

SUMPRODUCT Question
 
Once again Bob, YOU ARE THE MAN!!!!


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com