Combining IF and INDEX functions

Occasional Contributor

Hi,

 

We have departments and codes. Something like

Code     Department

HOL      Holding

MAN     Manufacturing

SAL       Sales

 

I would like to have a function with arguments to input with code and return with department. How can I do this.  Thanks all.

2 Replies

That's for PowerShell, right? The switch statement might be a good fit: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_switch?view...

 

 

@Vasil Michev Thanks for your reply. This could do for me