Sorry for not being very clear.
I made this post now more clear, Please ignore my first post.
>Columns A to E is an example of data with headings in table "info" in sql server.
>Columns H & I is an excel sheet.
What i want When I add ID number in H2 cell then sql statement should access current status of this ID from table info and show up in i2 cell.
Please see image, the status of ID 1 is Employed in Status Column in info table, and ID 2 is Unemployed .
>if I add ID number 1 in excel sheet in cell no H2, the status Employed should show up in i2 cell. or whatever status is available.
>if I change ID number in H2 and added ID number 2 , the current status should show "unemployed " or whatever is.
it is same like vlookup.
Please help.
Thanks