conditional formatting using formula

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi I want to format (change the color) of any row which has word "left" in the second column.
I highlighted everything and went to CF-->Formula and wrote this formula

=A1="left"

But that only highlighted the cell in 3rd column which has value = left. I want to highlight the whole row (3 cells). Thank you.

namedeptsalary
jimit100
alexhrleft
marysales50
danmarketingleft

<tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
First of all "left" is in the 3rd column of your data not the second.

I'm assuming jim is in A2, adjust to fit

Select A2:C5

Conditional Formatting
New Rule
Use a formula to determine...

=($C2="left")

Format as required
 
Last edited:
Upvote 0
Works perfectly. Thank you so much. Could you please tell me if you do not mind how did that work? do the ( ) have anything to do with that? Thank you once again.

First of all "left" is in the 3rd column of your data not the second.

I'm assuming jim is in A2, adjust to fit

Select A2:C5

Conditional Formatting
New Rule
Use a formula to determine...

=($C2="left")

Format as required
 
Upvote 0
No, it has nothing to do with the parentheses, but everything to do with the $. The is called an absolute reference, and locks that column down, so as you move across other columns, that reference never changes.
To learn more about absolute, relative, and mixed references, read this here: http://www.excel-easy.com/functions/cell-references.html

Also, another option to using the format painter to apply it to a multi-cell range is to first select the entire range you want this Conditional Formatting to run against, and then write the formula as it pertains to the very FIRST cell in the selection. If you have set your range references correctly (locking the proper ones with absolute references, if necessary), Excel will automatically adjust it for all the other cells.
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,840
Members
449,411
Latest member
adunn_23

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