Private Sub UserForm_Initialize()
Dim LastRow As Long
Dim LastCol As Long
Dim Criteria1 As String
Dim Criteria2 As String
Dim Result As String
LastRow = Sheet1.Cells(Sheet1.Rows.Count, "A").End(xlUp).Row
LastCol = Sheet1.Cells(1, Sheet1.Columns.Count).End(xlToLeft).Column
Criteria1 = Sheet1.Range("A2").Value
Criteria2 = Sheet1.Range("B2").Value
Result = Application.Vlookup(Criteria1 & Criteria2, Sheet1.Range(Sheet1.Cells(1, 1), Sheet1.Cells(LastRow, LastCol)), 3, False)
Me.TextBox1.Value = Result
End Sub
ممكن تجرب هذا الكود لعله يفيد وعدل عليه حسب الرغبه