Hi, Shaminder Singh!
Debraj(ex-Roy)'s solution works perfectly. Give a look at the uploaded file.
There you have 2 solutions:
a) Column K: Debraj's formula
b) Column L: VLOOKUP function on a new table (Tabla4, columns N:O)
L2: =BUSCARV([Time];Tabla4;2;VERDADERO)&" Shift" -----> in english: =VLOOKUP([Time],Tabla4,2,TRUE)&" Shift"
For a) the only point with which you have to take care of is with the column and row separator characters used in your Excel version.
Debraj(ex-Roy) posted the English version: "," for columns and ";" for rows".
In my Spanish version (which you won't see unless you have it, i.e., you'll always see your local separators) I have to use these: "\" for columns and ";" for rows, since "," is my decimal separator.
Just advise if any issue.
Regards!