Here's a new version of the UDF you can use with more than one row in the second parameter:
Option Explicit
Function RangeCheck(dataRNG As Range, Offsets As Range, MyValues As Range) As Long
Dim col As Long, r As Range
If dataRNG.Columns.Count <> Offsets.Columns.Count Or dataRNG.Columns.Count <> MyValues.Columns.Count Then
RangeCheck = -99999
Exit Function
End If
For col = 1 To dataRNG.Columns.Count
For Each r In Offsets.Cells(1, col).Resize(Offsets.Rows.Count)
If dataRNG.Cells(dataRNG.Rows.Count - r.Value + 1, col) = MyValues(col) Then
RangeCheck = RangeCheck + 1
GoTo NextCol
End If
Next r
NextCol:
Next col
End Function
Used as: =RangeCheck($B$23:$H$42, $J33:$P42, $W$42:$AC$42)
Bookmarks