Brain not functioning..how to i get a cell to conditional format a colur if it contains a certain letter

damian_r_Home

Board Regular
Joined
Jan 8, 2005
Messages
231
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Morning.
Yes i shoul dknow this one, but i don't...

In cell T24 i want it to change colour using conditional formatting if cell I24 contains the letter C ... the problem is that cell I24 may contain any of the text C1, C2, C3, C4, etc etc

What is the formula please?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Give this Conditional Formatting formula a try...

=COUNTIF(T24,"*C*")
Does this formula means that any letter beings or end with C
what is the function of * please explain as i have seen many tutorials on internet but its confusing .
 
Upvote 0
@earthworm

For "xxxCxxx"
=COUNTIF(T24,"*C*") (Any character before and After C )

For "Cxxx"
=COUNTIF(T24,"C*") ( C must be at starting only after any character)

For "xxxC"
=COUNTIF(T24,"*C") (C must be at the end only before any character)

Is my above understanding correct ?
 
Upvote 0
I think your understanding is correct, but I believe you need to switch the words "after" and "before" to make the English correct for that understanding.
 
Upvote 0
You could also use:

Excel Formula:
=SEARCH("C",T24)

for a non case-sensitive search, or:

Excel Formula:
=FIND("C",T24)

for a case-sensitive one.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top