# If Column A matches Column D, replace it with Column E (same row)

This picture should explain what I mean:

I want to swap my orders that have IDs into their real names, like the second order table.

-
So do you mean A, D and E? – Lance Roberts Dec 7 '10 at 6:06
Yes in the image, the title was generic. – FlavorOfLife Dec 7 '10 at 6:12
What is your question? Can you please clarify in small words that I can understand? – user3463 Dec 7 '10 at 6:25
I've edited the picture, it should make more sense now. – FlavorOfLife Dec 7 '10 at 7:02
Well that makes a difference, you need to reference the sheets, I've edited my answer. – Lance Roberts Dec 7 '10 at 8:37

For cell A10, then drag down:

=VLOOKUP(Sheet1!A3, Sheet1!\$D\$3:\$E\$5, 2)
-
Odd, I've entered this, nothing returns. I have to note that the cell format is just plain text. – FlavorOfLife Dec 7 '10 at 6:39
@Flavor, so what does it show in the cell, completely nothing? – Lance Roberts Dec 7 '10 at 6:42
No, just the formula – FlavorOfLife Dec 7 '10 at 6:46
@Flavor, that happens to me when I forget the '=' sign. Though maybe you have calculation turned off (if so then hit 'F9'). – Lance Roberts Dec 7 '10 at 6:47
Not having much luck still. But I've edited the picture, can you explain or link me how vlookup works? – FlavorOfLife Dec 7 '10 at 7:00

I think what you want is VLOOKUP. You would use a static list of ID and string value, assign it to a Named region, and then use VLOOKUP to fetch the string for matching IDs.

-

In cell A9 use the formula:

=VLOOKUP(A2, \$D\$3:\$E\$5, 2, false)
-