I am using a personnel system that labels departments using numbers. I'm trying to efficiently evaluate the cells and if the number is present, replace it with the words.

I essentially want to evaluate A1:A5, and if it equals anything in B1:B5, then replace it with D1:D5

For example, if A1=B1 or B2 or B3 or B4 or B5, replace with corresponding value in D column.

further example, 123 would be replaced with gear dept, 891 would be replaced as spin dept.

I think I have attached a picture of the sheet, I have tried REPLACE,SUBSTITUE, and even messed around IF functions.

Any help would be greatly appreciated

Screenshot 2022-03-08 010739.jpg