Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to auto-fill text based on text in another cell
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 |
#2
|
|||
|
|||
One way is to create a table of airport codes and cities,
then use VLOOKUP. See here for instructions: http://www.contextures.com/xlFunctions02.html HTH Jason Atlanta, GA -----Original Message----- 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 . |
#3
|
|||
|
|||
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 DataValidationList. Select M1:M10 as your list. Gord Dibben Excel MVP On Wed, 16 Feb 2005 10:59:04 -0800, "Jason" wrote: 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 |
#4
|
|||
|
|||
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 -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=346038 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto fill option box disappeared | Excel Worksheet Functions | |||
HOW CAN I AUTO FILL A CELL WITH TEXT FROM ANOTHER WORKSHEET TEXT . | Excel Worksheet Functions | |||
Putting text in a column based on variable text from another colum | Excel Discussion (Misc queries) | |||
Identifying the Active Fill Color | Excel Discussion (Misc queries) | |||
Auto Fill Options | Excel Discussion (Misc queries) |