Conditional format last row of positive value in table

SimonHughes

Active Member
Joined
Sep 16, 2009
Messages
386
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
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,364
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.
 

SimonHughes

Active Member
Joined
Sep 16, 2009
Messages
386
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
 

arthurbr

Well-known Member
Joined
Dec 8, 2006
Messages
2,170
Office Version
  1. 2010
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,123,139
Messages
5,599,956
Members
414,351
Latest member
james27

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
Top