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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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