Apply the same conditional formatting to another cell when it's applied to others

Glasgowsmile

Active Member
Joined
Apr 14, 2018
Messages
280
Office Version
  1. 365
Platform
  1. Windows
I have this formula for Conditional formatting
Excel Formula:
=ROUND($D$3*$C7,)>D7
and what I want to do... If the formatting is applied to any cell in range D7:NE41, then I want to apply that same formatting to D45:NE79 - the issue is that if I add that second range to the "Applies to" section of the conditional formatting, it doesn't work likely due to the range in the rule but data only exists up to row 41, so I assume that's why the rule doesn't work. I could create a helper column with the same data but I'm trying to avoid that.

So, I'm looking for a workaround.

My thought right now is below but it's not working, says Object required and I'm not sure what the issue is.

VBA Code:
Sub Colors()
If ThisWorksheet.Range("D7:NE41").Interior.Color = &HDA9694 Then
    ThisWorksheet.Range("D45:NE79").Interior.Color = &HDA9694
End If
End Sub
 
Last edited:
OK, I see what you mean now (pictures really do "say 1000 words!").

This is actually a lot simpler than you think.
Simply highlight your lower section, and use the EXACT same Conditional Formatting color.

So, for the example above, you would simply select range C9:D12, and enter the Conditional Formatting formula:
Excel Formula:
=ROUND($C$1*$B3,)>C3

Make sense?
Agreed, my apologies. I should have done that the first time :D

I'm stunned at the solution though. I clearly made this more difficult - thanks!
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
No worries!

It happens to all of us some time. Sometimes we cannot see the forest for the trees and overlook the obvious.
Sometimes, you just need a fresh set of eyes to see it.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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