Conditional Formatting Borders

kp91149

New Member
Joined
Nov 7, 2019
Messages
2
I want to set up conditional formatting so that if a cell has data the entire row will automatically get borders. The possible columns that can have data are A:E. The rule I am using is =OR(A1<>"",B1<>"",C1<>"",D1<>"",E1<>"") and applies to =$A:$E. This mostly works but if for example only cell A has data the borders are only applied to cell A and not the rest of the row. On the other hand if only cell E has data the borders are applied to all cells in the row (A:E). I can only imagine that I have messed up something in how the rule is applied but for the life of me I can't understand the logic here. I can get it to work if I create 5 separate rules and apply it to only one column at a time but I am hoping there is some way to roll it into one rule. Any suggestions?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Select columns A:E and try this as your Conditional Formatting Formula:
=COUNTA($A1:$E1)
 
Upvote 0
Perfect, that does the job exactly. Why is the correct answer always a more simple formula than the convoluted and complicated one you try first? Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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