If specific # of certain characters in a range, "OK", if not "Aler

S

Steve

I have various codes(letters) in cells B1 thru N1.(see below)
If B1:H1 has 5 or more C's , I want "OK", if not "Alert". In this case, it
would be "alert' because only 4 C's.
Also if H1:N1 the same. This scenario would be "OK", because it has 5 C's in
that range. Something like the below:
If(B1:H1("[[[has 5 or more C's]]]","OK","Alert")

B C D E F G H I J K L M N
s c c ns c ns c c c ns c ns c

Thanks,

Steve
 
T

T. Valko

Try this:

=IF(COUNTIF(B1:H1,"c")<5,"Alert","OK")

=IF(COUNTIF(H1:N1,"c")<5,"Alert","OK")

H1 overlaps in both formulas?
 
S

Steve

Perfect, thanks guys.

yes, H1 overlaps both.

Steve

T. Valko said:
Try this:

=IF(COUNTIF(B1:H1,"c")<5,"Alert","OK")

=IF(COUNTIF(H1:N1,"c")<5,"Alert","OK")

H1 overlaps in both formulas?

--
Biff
Microsoft Excel MVP


Steve said:
I have various codes(letters) in cells B1 thru N1.(see below)
If B1:H1 has 5 or more C's , I want "OK", if not "Alert". In this case, it
would be "alert' because only 4 C's.
Also if H1:N1 the same. This scenario would be "OK", because it has 5 C's
in
that range. Something like the below:
If(B1:H1("[[[has 5 or more C's]]]","OK","Alert")

B C D E F G H I J K L M N
s c c ns c ns c c c ns c ns c

Thanks,

Steve
 
T

T. Valko

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


Steve said:
Perfect, thanks guys.

yes, H1 overlaps both.

Steve

T. Valko said:
Try this:

=IF(COUNTIF(B1:H1,"c")<5,"Alert","OK")

=IF(COUNTIF(H1:N1,"c")<5,"Alert","OK")

H1 overlaps in both formulas?

--
Biff
Microsoft Excel MVP


Steve said:
I have various codes(letters) in cells B1 thru N1.(see below)
If B1:H1 has 5 or more C's , I want "OK", if not "Alert". In this case,
it
would be "alert' because only 4 C's.
Also if H1:N1 the same. This scenario would be "OK", because it has 5
C's
in
that range. Something like the below:
If(B1:H1("[[[has 5 or more C's]]]","OK","Alert")

B C D E F G H I J K L M N
s c c ns c ns c c c ns c ns c

Thanks,

Steve
 

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