Vlookup in Userform with Error Handling in Hindi Step by Step

Опубликовано: 17 Март 2026
на канале: Daood Computer Centre
6,194
151

Learn 60 Formula collection in excel
   • MS Excel Formulas List | Learn 60 Formulas...  

VBA CODE
Private Sub TextBox1_Change()
If Len(Trim(TextBox1)) = 0 Then
Exit Sub
End If

TextBox2 = ""
TextBox3 = ""
TextBox4 = ""

If Application.WorksheetFunction.CountIf( _
Sheet2.Range("A2:A5"), TextBox1.Text) = 0 Then
Exit Sub
End If


TextBox2 = Application.WorksheetFunction.VLookup( _
CLng(TextBox1), Sheet2.Range("A1:D5"), 2, False)

TextBox3 = Application.WorksheetFunction.VLookup( _
CLng(TextBox1), Sheet2.Range("A1:D5"), 3, False)

TextBox4 = Application.WorksheetFunction.VLookup( _
CLng(TextBox1), Sheet2.Range("A1:D5"), 4, False)
End Sub