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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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,215,227
Messages
6,123,745
Members
449,116
Latest member
alexlomt

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