Array Forumula Using SUM

Z

Ziad

I have the array formula:

=SUM(('#1-All'!$F$2:$F$914="X")*('#1-All'!$E$2:$E$914="Y")*
('#1-All'!$B$2:$B$914="Z"))

This will tell how many records in sheet '#1-ALL' have
column F="X", column E="Y" and column B="Z".

What if I want the number of records in sheet '#1-ALL'
that have column F=any value, column E="Y" and column
B="Z"? This is similar to the first example, but I want
to see where column F is not missing.
 
Z

Ziad

I know that I can just remove the ('#1-All'!
$F$2:$F$914="X") portion of the formula to get the result,
but I have a combo box that changes "X" to "Y" or "Z" (the
values in column F). I want the option of looking
for "X", "Y", "Z", or ALL.
 
L

Leo Heuser

Ziad

One way:

SUM(('#1-All'!$F$2:$F$914<>"")*('#1-All'!$E$2:$E$914="Y")*
('#1-All'!$B$2:$B$914="Z"))

or

SUMPRODUCT(('#1-All'!$F$2:$F$914<>"")*('#1-All'!$E$2:$E$914="Y")*
('#1-All'!$B$2:$B$914="Z"))

to be entered with just <Enter>.
 
J

Jason Morin

If col. F can be any value, simply remove this part from
the array formula:

=SUM(('#1-All'!$E$2:$E$914="Y")*('#1-All'!$B$2:$B$914="Z"))

If you do not want to count blank cells in F but still
count any value, try:

=SUM(('#1-All'!$F$2:$F$914<>"")*('#1-All'!$E$2:$E$914="Y")*
('#1-All'!$B$2:$B$914="Z"))

Array-entered.

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top