Free Porn Movie Any Download Free Porn Videos - IMDb.Q:
Highlight Column if another cell contains specific value
I have a bit of code that allows me to highlight a column if it contains a value. It works fine, but the only thing I would need is to highlight the column if the value in a different column in the sheet is equal to a specific value.
Sheet: Value A
Sheet: Value B
If Sheet: Value A contains AAA (and not BBB), the Range A3:F3 will be highlighted, if Sheet: Value B contains BBB, the same Range will be highlighted.
Sub HighlightSpecificValue(rng As Range, SpecificValue As String)
For Each cell In rng
If cell.Value = SpecificValue Then cell.Interior.Color = RGB(255, 0, 0)
'If SpecificValue = "xxxxxx" Then cell.Interior.Color = RGB(255, 255, 0)
I can't figure out how to get this code to highlight a column if it contains a value that is in another column of the same sheet. I've searched for answers but couldn't find any relevant ones.