You are here:

Excel/Automatically filling text, based on a number


In my main spreadsheet, I have over 10,000 personnel records which include employee's information such as:

Hire Date
Department Number
Job Title etc.  

In a new column adjacent to the department number, I would like text to be automatically added reflecting the department name.  I have about 20 department numbers and department names already set up on a separate spreadsheet.    

On the main spreadsheet, how do I have excel automatically populate the text of a department name, in a new column, based upon a department number?  I don't want to replace the department number, but rather visually see the name in a column next to the number?

I so look forward to hearing back from you.  This is my first time using this resource and I would be so grateful for your help!

Easy peasy. Use a VLOOKUP. It's explained in an article I wrote ages ago:

Make sure your lookup range (that other spreadsheet with departments and numbers on it) have the name left and the number right so that your vlookup works properly.

If you have problems, you can take SOME records and save to a new file and send to anne dot troy at gmail dot com and I'll write your formula for you.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Anne Troy


Virtually all common questions about Microsoft Excel, including all versions. Help with formulas, functions, optimum data layout, and application management. Please: No VBA or macro questions.


I taught Advanced Microsoft Excel to the senior accountants at the Environmental Protection Agency. Let's hope they were listening.

Dreamboat on Word Office VBA: Macros You Can Use Today

Self-taught and worked with the best in Microsoft Office applications.

Awards and Honors
Microsoft Word MVP 2008

©2016 All rights reserved.