简体   繁体   中英

Searching for a cell in a column and if it exists returning an adjacent value in Excel

![enter image description here][1]Afternoon Guys,

I saw a couple threads that were similar to what im looking to do.. but from what Ive tried so far I cant get this working.

Im trying to make a formula that takes a cell (Green on the left), searches for it in a column (green column on the right) and then if found returns the adjacent value (in blue)

Can anyone get me started on this?

Ok, apparently I cant post images yet....

See VLookup .

You can use the VLOOKUP function to search the first column of a range of cells, and then return a value from any cell on the same row of the range. For example, suppose that you have a list of employees contained in the range A2:C10. The employees' ID numbers are stored in the first column of the range...If you know the employee's ID number, you can use the VLOOKUP function to return either the department or the name of that employee.

The format for VLOOKUP is (lookup value, search array, index number, match type) where:

  • lookup value is the thing you are searching for (A14)
  • search array is the table where you plan to get the data back from, where the far-left column contains the lookup values you are searching against (judging from your comment, you will need to move things around)
  • index number is the 1-based index of the column that has the value you want to return. The key column (far left) is 1, and increases in your range as you go right
  • The fourth parameter needs to be false in almost all cases.

Keeping in mind that VLOOKUP will return on the first match it finds from the top of the list, regardless of how many matches there are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM