Sub FindMatch()
'
Dim ColumnCounter As Long
Dim FirstRowToLoad As Long, MaxRowToLoad As Long
Dim ArrayAtoG As Variant, ArrayJtoP As Variant
'
FirstRowToLoad = 1 ' <--- Set this to first row to load
MaxRowToLoad = 50 ' <--- Set this to last row to load
'
ArrayAtoG = Range("A1:G1") ' Load A1:G1 to 2D One based array ... RC ... 1,1 thru 1,7
'
ArrayJtoP = Range("J" & FirstRowToLoad & ":P" & MaxRowToLoad) ' Load J:P range into 2D One based ArrayJtoP ... RC
'
ColumnCounter = 1 ' Initialize ColumnCounter
'
For ArrayJtoP_Row = FirstRowToLoad To MaxRowToLoad ' Loop to loop through ArrayJtoP
If ArrayJtoP(ArrayJtoP_Row, ColumnCounter) = ArrayAtoG(1, 1) And _
ArrayJtoP(ArrayJtoP_Row, ColumnCounter + 1) = ArrayAtoG(1, 2) And _
ArrayJtoP(ArrayJtoP_Row, ColumnCounter + 2) = ArrayAtoG(1, 3) And _
ArrayJtoP(ArrayJtoP_Row, ColumnCounter + 3) = ArrayAtoG(1, 4) And _
ArrayJtoP(ArrayJtoP_Row, ColumnCounter + 4) = ArrayAtoG(1, 5) And _
ArrayJtoP(ArrayJtoP_Row, ColumnCounter + 5) = ArrayAtoG(1, 6) And _
ArrayJtoP(ArrayJtoP_Row, ColumnCounter + 6) = ArrayAtoG(1, 7) Then ' If all values match then ...
MsgBox "Match found in row " & ArrayJtoP_Row ' Display Message box indicating the matching row
Exit Sub ' Exit this sub
End If
Next ' Loop back
End Sub