Hi makinmomb
I have no idea how fast this Code will run on 10's of Thousands of records but it appears to do as you require. Ctrl + x will fire the Code.
Option Explicit
Sub Find_Yellow()
Dim ws As Worksheet
Dim Rng As Range
Dim cel As Range
Dim LR As Long
Dim myTot As Long
Dim sp As Variant
Dim x As Long
Dim y As Long
Dim i As Long
Dim j As Long
Application.ScreenUpdating = False
Set ws = Sheets("Sheet1")
With ws
.Cells.Interior.ColorIndex = 0
LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
.Range("B2:W" & LR).Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
For i = 1 To Selection.Areas.Count
sp = Split(Replace(Selection.Areas(i).Address, ":", ""), "$")
x = sp(2)
y = sp(4)
If Not x = y Then
For j = 2 To 23
myTot = WorksheetFunction.Sum(.Range(.Cells(x, j), .Cells(y, j)))
If myTot >= 1 Then
Set Rng = .Range(.Cells(x, j), .Cells(y, j))
For Each cel In Rng
If cel.Value = 0 Then
cel.Interior.ColorIndex = 6
End If
Next cel
End If
Next j
End If
Next i
For Each cel In Selection
If cel.Interior.ColorIndex <> 6 Then
cel.Interior.ColorIndex = 22
End If
Next cel
End With
Application.ScreenUpdating = True
End Sub
Bookmarks