Hello Binar,
This VBA macro is a UDF. You can use it like a Formula on the worksheet. It will return the address of the first cell in the match. In this case, it would return $A$6. If there is no match then an empty string is returned "".
Example=Search4($A$1:$D$10,4,11,33,40)
Copy this code into a new VBA Module in your workbook.
' Written: December 07, 2016
' Author: Leith Ross
Function Search4(ByRef Rng As Range, ParamArray SearchTerms() As Variant) As String
Dim Data As Variant
If UBound(SearchTerms) <> 3 Then Exit Function
Data = Rng.Value
For j = 1 To Rng.Rows.Count
If Data(j, 1) = SearchTerms(0) Then
If Data(j, 2) = SearchTerms(1) Then
If Data(j, 3) = SearchTerms(2) Then
If Data(j, 4) = SearchTerms(3) Then
Search4 = Cells(j, Rng.Column).Address
Exit Function
End If
End If
End If
End If
Next j
End Function