All about numbers
some rows in my actual data were empty.
Which columns can be empty? Any of them?
This assumes every column *must* have an entry *and* the values in columns
C&D will always be positive:
=SUMPRODUCT(--(MMULT(--(ISNUMBER(A1:D8)),{1;1;1;1})=4),--(A1:A8-B1:B80),--(C1:C8+D1:D8=0))
--
Biff
Microsoft Excel MVP
"andrew" wrote in message
...
I used this earlier but didn't work:
=SUMPRODUCT((C2:C9=0)*(D2:D9=0)*((A2:A9)(B2:B9)))
When i checked, some rows in my actual data were empty. Will try again.
"T. Valko" wrote:
Try this:
=SUMPRODUCT(--(A1:A8-B1:B80),--(C1:C8=0),--(D1:D8=0))
--
Biff
Microsoft Excel MVP
"andrew" wrote in message
...
I have the following table:
A B C D
3 1 0.5 0
2 2 0 0.5
3 2 0 0
0 1 0.5 0
1 0 0 0
2 1 0 1
1 2 0.5 0
4 1 0 1.5
The formula required is to:
1) check if any row in column C has 0 (zero) and see corresponding cell
in
column D also has 0 (zero). Table above shows row 3 and 5.
2) if matches, then check if (cell A - cell B) of the same row where
the
above condition is true returns a positive value.
3) if a positive value is returned, then count it. Above example will
return
a value of 2 (both occurences of 0 in C3 & C5).
Can anyone help?
|