I think your problem is better suited for vlookup:
On Sheet1, enter in your department to match in Cell A1 and place the following formula in B1: =VLOOKUP(A1,Sheet2!A:B,2)
On Sheet2, your data should be organized as department in column A and name in column B.