Let's say these are our data - sheet1:
| A | |
|---|---|
| 1 | Pink |
| 2 | Blue |
| 3 | Green |
And this is our table array - sheet2:
| A | B | C | |
|---|---|---|---|
| 1 | Green | 10 | Grass |
| 2 | White | 14 | Snow |
| 3 | Pink | 25 | Flower |
| 4 | Yellow | 28 | Sun |
| 5 | Blue | 62 | Sky |
What we want to get are the values from column C (sheet2) for the data from column A (sheet1). C is the third column number in table array from which the matching value must be returned. $ - means that we bloked the range, otherwise the range would change when coping formula to other cells. Last value is FALSE cause we want to get an exact match.
| A | B | |
|---|---|---|
| 1 | Pink | =VLOOKUP(A1,sheet2!A$1$:C$5$,3,FALSE) |
| 2 | Blue | =VLOOKUP(A2,sheet2!A$1$:C$5$,3,FALSE) |
| 3 | Green | =VLOOKUP(A3,sheet2!A$1$:C$5$,3,FALSE) |
The formula returns:
| A | B | |
|---|---|---|
| 1 | Pink | Flower |
| 2 | Blue | Sky |
| 3 | Green | Grass |
No comments:
Post a Comment