Highlight a cell if another cell in the row has been manually highlighted

adambc

Active Member
Joined
Jan 13, 2020
Messages
380
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I have a Worksheet with 8 columns, A to H ...

Column A is the "control" column ...

Columns B to H are the working columns which may be highlighted in yellow manually ie NOT as a result of a conditional format by the user ...

I want to automatically highlight column A if ANY of the cells in columns B to H in the same row are highlighted ...

Is there a way of doing this?

Thanks ..
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I have written a useful UDF which counts the number of cells in a range which match a certain color. you could use this combined with conditional formating to achieve the result you want.
this is the UDF
VBA Code:
Function countByColor(CellColor As Range, rRange As Range)
Application.Volatile
Dim cSum As Double

Dim ColIndex As Integer
ColIndex = CellColor.Interior.ColorIndex
For Each cl In rRange
If cl.Interior.ColorIndex = ColIndex Then
cSum = cSum + 1
End If
Next cl
countByColor = cSum
End Function
The first range (Cellcolor) is used to select what color you want counted this should be a single cell
the second range is the range where you wanted the colors counted, in your case if this is not zero then conditional formatting can be used to highlight the cell
 
Upvote 0

Forum statistics

Threads
1,215,777
Messages
6,126,834
Members
449,343
Latest member
DEWS2031

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