Jump to content

Excel formula to search a value in a list and give the value of the adjacent cell

I need a formula that search a determinate value in a range of cells and give the value of the adjacent cell.

 

In the attached document there is a list of students that are going to attend to a graduation party and each student has an unic number, the idea is type the ID of the student and automatically will appear the table where he/she is going to sit 

So, I need a formula that can search the ID in the list and return the value of the adjacent celd, where the number of table is 

example.xlsx

Link to comment
Share on other sites

Link to post
Share on other sites

A formula would require a very long string of if statements (one for each id). Alternatively you would use a macro to do what you want.

If you're interested in a product please download and read the manual first.

Don't forget to tag or quote in your reply if you want me to know you've answered or have another question.

Link to comment
Share on other sites

Link to post
Share on other sites

VLOOKUP or INDEX and MATCH will work. Use INDEX and MATCH since VLOOKUP assumes an ascending order and does a binary search. If it finds a value which is greater than your search term it will fall back and use the last value.

https://support.office.com/en-us/article/look-up-values-in-a-list-of-data-c249efc5-5847-4329-bfee-ecffead5ef88

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×