Formula blues....

  • Thread starter Thread starter telewats
  • Start date Start date
T

telewats

I am trying to determine the total count of cells containing certain
data, and I can't get my formula to work correctly. I need to get the
total number of cells that fit the following criteria: If column B
contains xxx, and column F is equal to yyy, yyy, yyy, or yyy, and
column G is not equal to zzz, then count the cells. I'm sure this can
be done (right?) but I am not having any luck.
 
Not sure I understood the part about the F column but try this:

=SUMPRODUCT((B1:B10="xxx")*OR(F1:F10="yyy,yyy,yyy")*OR(F1:F10="yyy")*(G1:G10<>"zzz"))

HTH
JG
 
Try:

=SUMPRODUCT((B1:B30="xxx")*((F1:F30="yyy1")+(F1:F30="yyy2")+(F1:F30="yyy3"))*(G1:G30="zzz"))

Although I'm sure that there are more efficient way of doing it.

--
HTH

Sandy
(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
=SUMPRODUCT((B17:B20="xxx")*(OR(F17:F20="yyy,yyy,yyy",F17:F20="yyy"))*(G17:G20<>"zzz"))

seems to work for me
 
Bill Kuunders said:
=SUMPRODUCT((B17:B20="xxx")*(OR(F17:F20="yyy,yyy,yyy",F17:F20="yyy"))*(G17:G20<>"zzz"))

seems to work for me

If it works for you then that is fine but it doesn't work for me. I don't
think that OR works in a SUMPRODUCT function.

When I enter xxx in B17:B20, zzz in G18 & G20 and just z in G19 then if I
put yyy in ANY cell in F17:F20 the formula return 2.

In other words the OR is making the yyy apply to all cells in F17:F20

The "+" in the formula I posted works like an OR but I see that I forgot to
eliminate the zzz in column G so it should have been:

SUMPRODUCT((B1:B30="xxx")*((F1:F30="yyy1")+(F1:F30="yyy2")+(F1:F30="yyy3"))*(G1:G30<>"zzz"))


--
HTH

Sandy
(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
I was going to reply saying that my formula didn't work after all but I guess
it should be obvious by now. Glad someone was able to come up with something
that works.
Learned something new in the process so that's good, thanks Sandy.

Regards
JG
 
pinmaster said:
I was going to reply saying that my formula didn't work after all but I
guess
it should be obvious by now. Glad someone was able to come up with
something
that works.

I'm still waiting for Aladin Akyurek to happen by and say that it is
inefficient <g>

--
Regards

Sandy
(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
Thank You

I didn't check it all because I wasn't expecting any problems.
again I'm learning every day............

Bill K
 

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

Similar Threads

To sum by grouping 1
Min Value 4
Delete Row if column has duplicate value 1
cell passwords 3
Sum data different size 2
code for sorting 4
macro help to change row colour automatically 1
Help Collecting Data 1

Back
Top