Cond. formatting based on row above

ThatOneDude

New Member
Joined
Aug 11, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
I have conditional formatting set up that essentially says "if the status is Active, make the text in that row orange." and another rule that says "if the status is Discontinued, make the text in that row red."

In the example below, the external model represents multiple internal models so I need all the rows underneath to have the same formatting. Basically, I need a conditional formatting rule that says "if the status column is empty, match the formatting of the last row above it where the status column isn't empty." I need the black rows under the orange row to be orange and I need the black rows under the red row to be red, etc.

Is this possible?

1688044224202.png
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Assuming your data above is in the range A1:C9, select range A2:A9 and enter the following two conditional formatting rules via formula.

Rule 1/Formula 1:
Excel Formula:
=INDEX($B$2:$B$9,MATCH(LEFT($C2,FIND("-",$C2)-1)&"*",$A$2:$A$9,0))="Active"
and choose your orange font color

Rule 2/Formula 2:
Excel Formula:
=INDEX($B$2:$B$9,MATCH(LEFT($C2,FIND("-",$C2)-1)&"*",$A$2:$A$9,0))="Discontinued"
and choose your red font color

Results:
1688047404200.png
 
Upvote 0

Forum statistics

Threads
1,216,051
Messages
6,128,505
Members
449,455
Latest member
jesski

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