How to auto-fill text based on text in another cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need to know how to auto-fill text based on text in another cell. For
example:

Every time I enter "CHS" in Column B, I want Charleston to auto-fill in
Column C.
And when I enter "SAN", in Column B, I want San Diego to auto-fill in Column
C.

How can I set up a list like this? Any ideas?

Thanks!

Jason
 
Jason

Probably VLOOKUP could work for you.

Assume your table of abbreviations and cities are in M1:N10

In C1 enter =VLOOKUP(B1,$M$1:$N$10,2,0)

Enter CHS in B1 to return Chareston in C1.

You could also turn B1 into a drop-down list so's you could just pick the
abbreviation, not type it.

Select B1 then Data>Validation>List. Select M1:M10 as your list.


Gord Dibben Excel MVP
 
use a vlookup table

Create your table on a new sheet (name the range "MyList") with Char |
Charleston, San | San Diego, Det | Detroit, Chi | Chicago, Lon |
London....etc. in adjacent columns and sort ascending.

In your first cell in col C (Cn) enter =VLOOKUP(Bn,MyList,2) {change
the 'n' to match the row you are in}

Copy this formula down your desired range

entering San in Bn will return San Diego in Cn

Question: How will you handle San Jose, San Antonio, etc.?

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top