Forum Discussion
jpnht1983
Aug 27, 2023Copper Contributor
Need help for conditional formatting with more than one specific text word
I need help to write a conditional formatting code for specific text. I have a worksheet with countif. I built a conditional format for specific text to color the cell a certain color, and the count...
HansVogelaar
Aug 27, 2023MVP
Select A1:EX1.
A1 should be the active cell in the selection.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=OR(A1="SN1D",A1="SN1N",A1="SN3D",A1="SN3N")
Click Format...
Activate the Fill tab.
Select a highlight color.
Click OK, then click OK again.
- jpnht1983Aug 27, 2023Copper ContributorDoes that work for a range? I do not need it for one cell. I need it for a range of cells from A1 to EX1.
- HansVogelaarAug 27, 2023MVP
Excel automatically adjusts the cell reference. For B1, it looks at the value of B1, etc.
This is because the formula uses the relative cell reference A1.
If we had used the absolute cell reference $A$1, the rule would color all cells in A1:EX1 depending on the value of A1 alone.
- jpnht1983Aug 27, 2023Copper ContributorThank you for the help.
It worked.
This is greatly appreciated.