An array and countif based on criteria in each column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
=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)
 

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

Back
Top