Thanks Domenic. I used the vlookup function and I have the desired output now.
Maybe in the future I will need to tweak it a bit more to make it more dynamic so that I can eliminate repetitive steps.
Thanks everyone for your help.
Have a great weekend.