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

  • Thread starter Thread starter Steve
  • Start date Start date
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
 
Try this:

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

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

H1 overlaps in both formulas?
 
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
 
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
 
Back
Top