Count occurance of multiple text criteria

S

Sam.D

Im using the formula

=SUM(LEN(B2:B955)-LEN(SUBSTITUTE(B2:B955,"Pension","")))/LEN("Pension")

This works fine to count the number of occurances for the word Pension but
Im stuck when trying to count using multiple criteria eg the the Pension and
the word Scheme.

Any help is greatly appreciated.

Sam.D
 
J

Jacob Skaria

Try

=SUM(COUNTIF(B2:B955,{"*Pension*","*Scheme*"}))

OR for whole cell match
=SUM(COUNTIF(B2:B955,{"Pension","Scheme"}))
 
S

Sam.D

Thanks, works great, huge help.

Cheers

Sam.D

Jacob Skaria said:
Try

=SUM(COUNTIF(B2:B955,{"*Pension*","*Scheme*"}))

OR for whole cell match
=SUM(COUNTIF(B2:B955,{"Pension","Scheme"}))
 

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

Top