how can i search for values in a range of cells, in another long range of cells?
basically i have one column (C) that contains all the keywords
and another column(B), which is the one i want to search in.
there is column开发者_运维百科 A, right beside B, which contains ID number.
I want to search all values in column c against column B, and obtain the relevant ID number.
If I got you correct I think you can use vlookup function of excel. eg :Have following formula in a cell.
=VLOOKUP(G6,E7:G10,3)
This will search for values mentioned in G6 cell from range E7:G10 and display the third column value.
If you're going to use VLOOKUP, remember to put FALSE in the last argument, which will give you an exact match (and doesn't require the range to be sorted
Sometimes you will be looking up a value which is to the left of the key column. In this case, VLOOKUP will not work.
I'd suggest you combine the INDEX() and MATCH() functions like this:
=INDEX(A1:C5, MATCH("your value", B1:B5, 0),1)
精彩评论