Hello all, I am trying to write a function that returns a manager’s name based on the name in a column. So if column F has “John Doe” or “Jane Doe” it will return a different value based on who their manager is. But I keep getting a blank return when I enter the info. Can someone please see what I amdoing wrong? Any help is greatly appreciated!
Code:
[FONT=Calibri][SIZE=3][COLOR=#000000]Public Function Manager(ManagerName As String) As String[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]Select Case UCase(ManagerName)[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]
Case "John Doe","Joe Doe"[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Manager = "Sally Sue"[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]Case "Jane Doe" , “Dan Doe”[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Manager = "Mary Smith"[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]End Select[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]
End Function
[/COLOR][/SIZE][/FONT]