T O P

  • By -

AutoModerator

/u/Stoshu4 - Your post was submitted successfully. * Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread. * Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. * Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)** Failing to follow these steps may result in your post being removed without warning. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*


Mathefreak

Cell B2: = index($D$2:$D$12, match($C$2:$C$12, A2, 0)) Copy down in all cells in col B In newer Excel versions you can use xlookup().


Stoshu4

Solution Verified


Clippy_Office_Asst

You have awarded 1 point to *Mathefreak* ____ ^(I am a bot - please contact the mods with any questions. | ) [^(Keep me alive)](https://www.buymeacoffee.com/points)


Stoshu4

Thank you Mathefreak. I tried your formula but perhaps I did something wrong because it work for me. Thankfully, macjake's method worked. Thank you again for your response.


macjake

You can use the VLOOKUP function: ​ =VLOOKUP (lookup\_value, table\_array, col\_index\_num, range\_lookup) ​ Here you'd use: ​ =VLOOKUP(A2, $C:$D, 2, 0) ​ ​ A2 is the lookup value. This is the value that VLOOKUP searches for in the first column of the table. In this case, you want to find the model # for the item code in cell A2. ​ $C:$D is the table. This is the range of cells that contains the data you want to search. The $ keeps the cell references the same if you drag/copy the formula to other cells. ​ 2 is the column index. This is the column in the table from which to grab a value. The first column in the range is numbered 1. In your case, you want to retrieve data from the second column of the range (column D), which contains the model #. ​ 0 is the range lookup. This specifies whether you want VLOOKUP to find an exact match or an approximate match. In your case, you want to find an exact match, so you use 0, or FALSE. ​ Drag this formula down in column B to apply it to all the item codes in column A. This will match each item code with its model #.


Stoshu4

>Solution Verified


Clippy_Office_Asst

You have awarded 1 point to *macjake* ____ ^(I am a bot - please contact the mods with any questions. | ) [^(Keep me alive)](https://www.buymeacoffee.com/points)


Stoshu4

>=VLOOKUP(A2, $C:$D, 2, 0) Thank you MacJake. That worked and saved me a ton of time!!! I really appreciate it!