Sumproduct a column where 2 adj text columns contain same value
Use cells to hold the criteria** :
E3 = 0
F3 = 1.01
G3 = Jones
H3 = Draper
I3 = Smith
=SUMPRODUCT(--(A3:A26E3),--(A3:A26<F3),--(B3:B26=G3),--(C3:C26=G3))
** Use cells to hold the criteria:
You'd have to redo this formula since array constants can't use cell
references.
=SUMPRODUCT((A3:A260.00)*(A3:A26<1.01)*(B3:B26={ "Smith","Draper","Jones"}))
=SUMPRODUCT(--(A3:A26E3),--(A3:A26<F3),--(ISNUMBER(MATCH(B3:B26,G3:I3,0))))
--
Biff
Microsoft Excel MVP
"Struggling in Sheffield"
wrote in message ...
Hi,
I'm using a sumproduct formula to ascertain the number of times that a
value
between 0 and 1 occurs in column A (range A3:A26), where the adjacent cell
in
column B (B3:B26) contains either "Smith", "Draper" or "Jones":
=SUMPRODUCT((A3:A260.00)*(A3:A26<1.01)*(B3:B26={" Smith","Draper","Jones"}))
This formula works fine and details the number of entries where the value
in
column A is between 0 and 1, and the name in the adjacent column B cell is
Smith Draper or Jones.
What I need to do is the same SUMPRODUCT of 0-1 entries in column A but
this
time where the names listed in column B are equal to more names listed in
Column C (i.e. where B7 = "Jones" and C7 = "Jones", 1 will be the added to
my
SUMPRODUCT total (if the value in A7 is between 0 and 1).
Keep skirting around the edges of this one without being quite able to
nail
it.
Any pointers gratefully received.
Cheers,
Steve.
|