Public Function My_Function(MyCell As String) As Integer
If MyCell = "" Then
My_Function = "0"
ElseIf MyCell = "احمد" Then
My_Function = "1"
ElseIf MyCell = "محمود" Then
My_Function = "2"
ElseIf MyCell = "محمد" Then
My_Function = "3"
ElseIf MyCell = "خالد" Then
My_Function = "4"
ElseIf MyCell = "عادل" Then
My_Function = "5"
ElseIf MyCell = "مازن" Then
My_Function = "6"
ElseIf MyCell = "جابر" Then
My_Function = "7"
ElseIf MyCell = "هانى" Then
My_Function = "8"
ElseIf MyCell = "سامح" Then
My_Function = "9"
ElseIf MyCell = "عمر" Then
My_Function = "10"
GoTo finish
End If
finish:
End Function