Conditional format last row of positive value in table

SimonHughes

Active Member
Joined
Sep 16, 2009
Messages
452
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a table with 40 rows and depending on input the values change from positive to negative. So with an inflation rate of 2.5% then row 23 will be the first row in negative numbers, if I change inflation rate to 1% then row 28 will be the first row in negative.

How do I conditionally format to highlight the last row in positive numbers? I know how to highlight all negative or all positive, but I would like to isolate the last row in positive territory.

I am using Excel 2016 Win 10
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You didn't provide too much information, but in general:
if the positive and negative values are consecutive in the table and are not intermixed you can use a formula to check if the product of two consecutive cells is not positive (e.g. =$A1*$A2<=0) and apply the desired conditional formatting to the row of A1.
 
Upvote 0
You didn't provide too much information, but in general:
if the positive and negative values are consecutive in the table and are not intermixed you can use a formula to check if the product of two consecutive cells is not positive (e.g. =$A1*$A2<=0) and apply the desired conditional formatting to the row of A1.

Thanks Bob, sorry for the lack of detail but you interpreated it fine.

I modified the formula as the two values were in A1 and B1 and as they were both negative values, I added instead of multiplied ending up with =$A1+$B1<=0 and applied the formatting no problem
 
Upvote 0
Select your range and use the following CF condition =$A1=LOOKUP(9.99999999999999E+307, IF($A$2:$A$18 > 0, $A$2:$A$18)) format as needed and adapt range

( no need to enter as CSE, it is implicit in CF)
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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