Color Cell if Cell's Text contains certain Text

sgexcel321

New Member
Joined
May 13, 2022
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hi, I wish to try to find out how can I color a cell if it contains a certain text.

I have found out how to count when it contains certain texts but I do not understand how to color a cell after much tries.

Below is a snippet of what I am currently doing.
ca2.GIF


So for example if I have two BRZ which contains either *ZC* or *ZD*, I wish to color the cell at A row 11/12 yellow or something. How do I really do it?.

Thanks, Best Regards
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
use conditional formatting and a formula

=OR(ISNUMBER(SEARCH("ZC",A1,1)),ISNUMBER(SEARCH("ZD",A1,1)))

Book1
A
1123zcaaa-1
2123zcaaa-2
3aa
4123zcaaa-4
5aaaa
6123zcaaa-6
7aaa
8AAAAzd-1225
9aaaa
10AAAAzd-1227
11AAAAzd-1228
12aaaa
13AAAAzd-1230
14AAAAzd-1231
15AAAAzd-1232
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A15Expression=OR(ISNUMBER(SEARCH("ZC",A1,1)),ISNUMBER(SEARCH("ZD",A1,1)))textYES



for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A1:A500 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=OR(ISNUMBER(SEARCH("ZC",A1,1)),ISNUMBER(SEARCH("ZD",A1,1)))

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK
 
Upvote 0
Solution
use conditional formatting and a formula

=OR(ISNUMBER(SEARCH("ZC",A1,1)),ISNUMBER(SEARCH("ZD",A1,1)))

Book1
A
1123zcaaa-1
2123zcaaa-2
3aa
4123zcaaa-4
5aaaa
6123zcaaa-6
7aaa
8AAAAzd-1225
9aaaa
10AAAAzd-1227
11AAAAzd-1228
12aaaa
13AAAAzd-1230
14AAAAzd-1231
15AAAAzd-1232
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A15Expression=OR(ISNUMBER(SEARCH("ZC",A1,1)),ISNUMBER(SEARCH("ZD",A1,1)))textYES



for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A1:A500 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=OR(ISNUMBER(SEARCH("ZC",A1,1)),ISNUMBER(SEARCH("ZD",A1,1)))

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

Hi, is there any way to base on the COUNTIF and then highlighting the cell in column A1? I also wish to count at the same time and I have a lot of different rules to set.
 
Upvote 0
Ah I understand how to do it already. For the search ("ZC"), is it better to use search ("*ZC*") or ("ZC"). Does it even matter with the * or no *?
 
Upvote 0
search is a function designed to search for the specific text within the cell , so Search("ZC") is already doing the search so no need for the * wild string
 
Upvote 0

Forum statistics

Threads
1,214,416
Messages
6,119,386
Members
448,891
Latest member
tpierce

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