Conditional formatting of block of data

excel-rob

Board Regular
Joined
Feb 24, 2009
Messages
58
Hi,

I'm trying to format each row in a block of data based on the entries in one column. So for example, in row 2, if cell E2 contains the words "complete" or "N/A", I want the text in all the columns in row 2 to be grey. Then the same with row 3, but with reference to E3, and so on.

Conditional highlighting seems the obvious choice, so I highlighted A2:E1000 and then put this formula into conditional highlighting:

=IF(OR(E2="complete",E2="N/A"),1,0)

and chose font colour grey.

This works, but only applies the formatting to column A. How do I get it to apply it to all the columns that I highlighted?

Thanks in advance for any help.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You shouldn't need the IF part of the formula and you do need an absolute reference to column E, hence the $ signs. Try

=OR($E2="complete",$E2="N/A")
 
Upvote 0
Thanks, that works great. Of course I didn't need the OR, it already gives a binary response :oops:

Why do you need the $ on the tested column out of interest?

Thanks.
 
Upvote 0
Thanks, that works great. Of course I didn't need the OR, it already gives a binary response :oops:

Why do you need the $ on the tested column out of interest?

Thanks.

the $E2 tells excel to keep looking in column E even if you move the formula left and right.
for example if you put a reference to E2 in column A and then copy it to B it will change the ref. to F2
i don't know if i succeded to explain it :rolleyes:
 
Upvote 0
Sorry, didn't explain myself very clearly. I know what the $ does in the normal way you just describe. I just don't understand when it changes the behaviour of conditional highlighting in the way described above...
 
Upvote 0
Sorry, didn't explain myself very clearly. I know what the $ does in the normal way you just describe. I just don't understand when it changes the behaviour of conditional highlighting in the way described above...
it does not change the formatting - it only fixes the location of the condition
 
Upvote 0
Works exactly the same way.

"...I'm trying to format each row in a block of data based on the entries in one column..."

So regardless of the column of the cell in the row you are formatting
every cell in that row needs to be based on that one column
 
Upvote 0
Of course I didn't need the OR, it already gives a binary response
You DO need the OR if you are testing for either "complete" or "N/A". What you didn't need was the IF function.
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,969
Members
449,059
Latest member
oculus

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