COUNTIF using exclusions

D

djDaemon

I have a column containing part numbers. I want to count the number of times
a part beginning with "RY..." occurrs. However, I wish to exclude the parts
that end with "...GBMK".

Could this be done easily with COUNTIF?

Any suggestions?
 
J

JMB

If your data is in B11:B14:

=SUMPRODUCT(--(LEFT(B11:B14,2)="ry"),--(RIGHT(B11:B14,4)<>"gbmk"))

Modify your range as necessary. Sumproduct cannot accept entire columns
such as A:A or A1:A65536, but A1:65535 is okay.
 
Top