PDA

View Full Version : Solved: Match help



KK1966
08-18-2008, 12:54 AM
I have form here's to found the employs & job response,
Now face the problem as most of the neme do not fully understand, might only the initials
How can modify the code to match any word in case of the name ,

Sample :
Michel Steve,
If type the Steve can it match the fully

Thanks you help
Private Sub combobox1_Afterupdate()
Dim rng As Range
With Sheets("Sheet1")
Set rng = Range(.Cells(1, 1), .Cells(1, 1).End(xlDown))
End With
With rng.Find(ComboBox1.Value, lookat:=xlWhole)
Label1.Caption = .Offset(, 1)
Label2.Caption = .Offset(, 2)

End with
End Sub

Bob Phillips
08-18-2008, 11:17 AM
Try



Private Sub combobox1_Afterupdate()
Dim rng As Range
With Sheets("Sheet1")
Set rng = Range(.Cells(1, 1), .Cells(1, 1).End(xlDown))
End With
With rng.Find(ComboBox1.Value, lookat:=xlPart)
Label1.Caption = .Offset(, 1)
Label2.Caption = .Offset(, 2)

End With
End Sub

KK1966
08-19-2008, 06:32 AM
Dear XLD

Thanks ur help ..