How do I automatically fill columns based on cell value from another excel file?

Occasional Visitor

I have a column filled with organization names in one excel spreadsheet (the same name is often repeated or occurs multiple times). In another spreadsheet, I have a sort of a code-book for these organizations. In the second file, the exact same names from the first file (duplicates removed) have corresponding cells in their row with additional information (i.e. what type of industry they are in). I would like to go back to the first file and add this information in based on their names. Is there a way to automatically add info into new columns automatically? 

2 Replies

Hi - You have to use a Vlookup formula. An example is on the attached file.


The workbook assumes that the "File 1" sheet is your 1st file and the "File 2 - Code Book" sheet is your 2nd file.  You would have to put the formula in Column b of your first file (the file with the duplicate values). Your lookup range will be on your second file (the file with the unique names and code book). Please let me know if this helps.


Here's the formula used in the file: =VLOOKUP($A2,'File 2 - Code Book'!$A$1:$B$7,2,FALSE)


Is there a way to expand this code to multiple columns?  For example, in the code book from your example there would be multiple code columns, say Code1, Code2, etc..  Then those would fill the multiple columns on the File 1.  So there would be multiple Import Code columns on File 1.