Private Sub ComboBox3_Change()
Dim WS As Worksheet
Dim LastRow As Long
Dim C As Range, FirstAddress As String
Set WS = Worksheets(1)
With WS
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
With .Range("a1:a" & LastRow)
Set C = .Find(Me.ComboBox1, LookIn:=xlValues)
If Not C Is Nothing Then
FirstAddress = C.Address
Do
If C.Offset(0, 1) = Me.ComboBox2 Then
Debug.Print Format(C.Offset(0, 2), "dd-mmm-yy"), Me.ComboBox3
If Format(C.Offset(0, 2), "d-mmm-yy") = Me.ComboBox3 Then
Me.TextBox1 = C.Offset(0, 3)
Exit Do
End If
End If
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> FirstAddress
End If
End With
End With
End Sub
Bookmarks