Have the value in a cell cause the same value in an array of data to light up red when value is equal

Hutchcove

New Member
Joined
Feb 22, 2015
Messages
9
Hard to explain what I'm looking for or if it is even possible.

B5 is the cell in which I have any value #.# (ex. 17.2)

I have an array of data from J5 to AB5 which different values
Another array from J10 to AB10 with different values and so forth
Currently these arrays are not one on top of the other (Can be done if it makes the formatting possible)

Expectations:
When the value in B5 is 17.2 and the same value exists in the arrays that I have in place, I woiuld like the array value of 17.2 to light up red. Moreover, if the value repeats in another array for the same value- it too light up red.

I hope this is clear but please let me know if you require additional information
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Here is VBA solution for you

Code:
Option Explicit


Sub Hutch()
    Dim c As Range, rng As Range
    Dim crit As Variant
    crit = Range("B5")
    Set rng = Range("J5:AB5", "J10:AB10")
    For Each c In rng
        If c = crit Then
            c.Interior.ColorIndex = 3
        End If
    Next c


End Sub
 
Upvote 0
Select your ranges

In conditional formatting
choose new rule then
Select use formula to determine which cells to format
use
=$B$5=J5

select your formatting and click OK

The VBA code above would have to be manually ran to to do the formatting unless it was changed to a change event.
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,458
Members
448,899
Latest member
maplemeadows

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