View Single Post
  #1   Report Post  
Peo Sjoblom
 
Posts: n/a
Default An array and countif based on criteria in each column

=SUMPRODUCT(--(B2:B50="C1"),--(L2:L50="C"))

or better

=SUMPRODUCT(--(B2:B50=M1),--(L2:L50=N1))

adapt to fit you real ranges accordingly, the last formula uses cell
references (M1 and N1) instead of hard coded criteria, that way you don't
have to edit the formula when you change from C1 to C2, just type it in cell
M1



--
Regards,

Peo Sjoblom

(No private emails please)


"Rochelle B" wrote in message
...
In column B, I have various codes, e.g. C1, C2, C3 and D. This represents
a
Floor Plan to an apartment building.
In column L, I will be entering a C or S adjacent to one of the codes
listed
above. This represent the "C"opper or "S"ilver upgrade packages that can
be
purchased.
I need a formula that will look for all C1's and count how many C's are
entered. I can then adjust the formula to look for C2 and count how many
C's
or S's are entered for C2 etc....My end result needed is to establish how
many Copper upgrades will be for each floor plan, and how many Silver
upgrades for each floor plan. I believe this will be an array formula,
combined with a countif but not sure how to lay it out. Please Help