Conditional Formatting across rows for first value less than zero

CLG31415

New Member
Joined
Apr 28, 2016
Messages
10
I am attempting to set up a conditional formatting rule that will create a border to distinguish when my sorted values have changed from positive to negative. My data is sorted by dollar amounts of growth and in this example, I'd like my formatting to have a line between rows 6 and 7 because that is the first instance when growth drops below zero. I used a formula in D2 that I found online to help determine when the minimum absolute value is in order to help set up my conditional formatting. The formatting works, but it only puts a border on one cell. instead of on the whole row. In the conditional formatting box I am using Applies to: A1:C13. And my Rule states: =OR(C2=0-$D$2,C2=0+$D$2) it is then supposed to put a border on the top part of the cell.

Is there an easier way to do this? And, is there a way to get the entire corresponding row to have a border instead of just one cell?


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Rank[/TD]
[TD]Month[/TD]
[TD]$ Growth[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]December[/TD]
[TD]30,000[/TD]
[TD]{=MIN(ABS(C2:C13-(0)))}[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]January[/TD]
[TD]20,000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]April[/TD]
[TD]10,000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]August[/TD]
[TD]5,000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]October[/TD]
[TD]1,000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]6[/TD]
[TD]February[/TD]
[TD](500)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]7[/TD]
[TD]July[/TD]
[TD](1,000)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]8[/TD]
[TD]May[/TD]
[TD](5,000)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]9[/TD]
[TD]March[/TD]
[TD](6,000)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]10[/TD]
[TD]November[/TD]
[TD](9,000)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]11[/TD]
[TD]September[/TD]
[TD](10,000)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]12[/TD]
[TD]June[/TD]
[TD](11,000)[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
The formatting works, but it only puts a border on one cell. instead of on the whole row. In the conditional formatting box I am using Applies to: A1:C13. And my Rule states: =OR(C2=0-$D$2,C2=0+$D$2)
Try locking down your column C reference, so it will not adjust as you move across columns A to C, i.e.
Code:
[COLOR=#333333]=OR([/COLOR][COLOR=#ff0000][B]$[/B][/COLOR][COLOR=#333333]C2=0-$D$2,[/COLOR][COLOR=#ff0000][B]$[/B][/COLOR][COLOR=#333333]C2=0+$D$2) [/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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