I have a list of Variables in Column A > list of items

another list of variables in Column B > with corresponding Item Codes for >> column A

And in Column C > I have list of item codes randomly listed

Now I need to replace the Column C with corresponding items in Column A

tried vlookup but could not !

  • Can you show an example of a tables data? If I understand you right, you have to use VBA to solve your problem. Mar 24 '14 at 21:33
  • @ChristianSt.: If the OP actually wants to replace column C automatically after values have been entered, you are absolutely right. It sounds more like a one time task to me though. Mar 24 '14 at 22:00
  • @TheUser1024: That's, what it sounds like, yeah. If he wants to use a formula, he needs to use (e.g.) column D for that purpose. Mar 25 '14 at 8:07

I think your issue is in the layout of your table. You might have to swap columns A and B, as your lookup value is in the second column of your array.

From Office Help

Two or more columns of data. Use a reference to a range or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text are equivalent.


Swap the Columns A and B, like @TheUser1024 suggested, and use column D for your VLOOKUP function:


Vlookup formula, looks for your assigned info into the first column in your table (left side) then looks for its correspondence into (right side) of the first column in your table. so whenever you do Vlookup it won't work

so the easiest way is to make: 1- Column A > Codes 2- Columns B > items 3- do your Vlookup formula that will work fine

you can also add if you want 4- give name to your table by highlighting your data in both columns A&B then go to formula then name manager. lets assume you named it "Itemsdata" and your data starts from row A2 so your formula will be =Vlookup(C2,Itemsdata,2). that will work perfect

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.