简体   繁体   中英

Replacing Cell Value with String

I have this Excel file where i have a list of items on the left and a list of who drops that item on the right (gaming wise)

http://i.imgur.com/oWSYl6G.png

On the right side, is there a way for me to automatically (i mean, not 1 by 1) put in the column to the right of (for example) "300", the name "Lette Pants"?

Of course, this should happen to all items, not just "300", by making a search on the left side searching for the name corresponding to the number and replacing the white cell with it.

Thanks in advance.

You could do a vlookup for this.

In cell L154, you can put:

=VLOOKUP(K154, A:B, 2, 0)

I'm not too familiar with tables in excel, but I think putting this formula there will also fill in the other cells automatically (in that column). Otherwise, just drag the formula (or copy/paste) it down.

K154 is what's the formula looking for (here, it's the 'id' 300)

A:B is the table the formula looks in, which is in columns A (where the 'id' is) and the result you want in column B.

2 means the second column in table A:B . If you wanted to get the stuff from column D, you would use =VLOOKUP(K154, A:D, 4, 0) instead (D is the 4th column, counting A as 1).

Finally, the 0 is for exact match. Setting it to true would make the formula return the corresponding value immediately lower than the value you're looking for if that value is not found. (eg you could say that if there is no 300, it will look for 299, then 298, etc until it finds one)

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