Private Sub TextBox1_Change()
lr = WorksheetFunction.CountIf(Range("a1:b32"), TextBox1.Text)
If TextBox1.Value <> "" And lr = 1 Then
TextBox2.Value = WorksheetFunction.VLookup(TextBox1.Text, Range("a1:b32"), 2, 0)
Else
TextBox2.Value = ""
End If
End Sub