I have a list of numbers between 0 to 100 in column L. And a list of items in column O. What I'm trying to do is if that single item has a 'lightness' number less or equal to 50 then the font in certain cells change color.
I need another set of eyes because I cannot get it to work or another approach.
I need another set of eyes because I cannot get it to work or another approach.
VBA Code:
Dim Item As Range 'single Item
Dim Lightness As Range 'Lightness list
Set Lightness = ShGE03.Range("L5", ShGE03.Range("L" & ShGE03.Rows.Count).End(xlUp))
Dim List As Range 'List of items
Set List = ShGE03.Range("O5", ShGE03.Range("O" & ShGE03.Rows.Count).End(xlUp))
Set Item = ShGE03.Range("A5") 'single item
If WorksheetFunction.Index(Lightness, WorksheetFunction.Match(Item, List, 0)).Value <= 50 Then
Range("A1:A4").Font.Color = vbWhite
Range("A37:A38").Font.Color = vbWhite
Range("A47:A48").Font.Color = vbWhite
Else
Range("A1:A4").Font.Color = vbBlack
Range("A37:A38").Font.Color = vbBlack
Range("A47:A48").Font.Color = vbBlack
End If
/CODE]