Help with CountIF formula

  • Thread starter Thread starter Smonczka
  • Start date Start date
S

Smonczka

Hello All,

Is there a way to use CountIF to count any cells with a particular
number or letter in the cell? I am trying to count the types of parts
we have. Each type of part starts with a particular letter. So one
type of parts might start with a "P", i.e. P105064 or P646546 or
P797985 and another might start with "T", i.e. T1266465, T879646 or
T8646377. What I need to do is count the number of different types of
parts. Is there a way to count if a cell value contains a "P"?

Thanks for all the help.

Steve
 
=SUMPRODUCT((LEFT(D2:D4,1)="p")*1)
or for both p & t
=SUMPRODUCT((LEFT(D2:D4,1)={"p","t"})*1)
 

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