Solved

Excel 2010

Posted on 2015-01-16
8
104 Views
Last Modified: 2015-01-16
I have three cells, city, state and zip. Id like to be able to enter a zip and have the city and state populated, anyway to do this within excel?
0
Comment
Question by:darrellbuckley
  • 5
  • 3
8 Comments
 
LVL 5

Expert Comment

by:Jim Riddles
ID: 40554108
Yes, this can be accomplished with the VLOOKUP function.

For it to work, you need to have a sheet within your Excel file that includes the ZIP Code, City and State.  It is definitely recommended to give it a named range for reference.

Once that is done, on the sheet where you will be entering information, simply include a VLOOKUP function for the City and State cells.  I am attaching a sample XLSX file for your review.

IMPORTANT: You need to have your full list of ZIP Codes sorted numerically for this to function correctly!

If you have any questions about the file, let me know.
VLookup-Sample.xlsx
0
 

Author Comment

by:darrellbuckley
ID: 40554215
So I've selected my GA Cities, City, State and Zip from my Cities worksheet define the name as GA, went back to my test state tab where I have Zip State City, selected the state cell and inserted vlookup, when the userform pops up I put Zip cell in for lookup value the GA name for Table_array and 2 for the Col_index but nothing populates when I put in a zipcode.
0
 

Author Comment

by:darrellbuckley
ID: 40554216
=VLOOKUP(F11,GA,2)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:Jim Riddles
ID: 40554221
Is it possible to share your sheet?  I will troubleshoot it for you.
0
 

Author Comment

by:darrellbuckley
ID: 40554235
0
 
LVL 5

Accepted Solution

by:
Jim Riddles earned 500 total points
ID: 40554260
Darrell,

Okay, it looks like there are two issues.  First is to make sure the value you want to look up is in the left most cell.  Cut and paste your ZIP Code field in the "A" column.

Second, I didn't see a named range for "GA".  In your "Cities" sheet, after moving Zip to the first column, select the entire range of cells from A1:C974.  Once you have that done, right click on the cells and choose "Name a Range".  A dialog box will pop-up.  Enter "GA" as the name, make sure Workbook is selected as the scope, add whatever comment you desire (if any) and click "OK".

Now go back to the "Test State" sheet and " AVONDALE ESTATES" should be populated into the State field.  That is because the state is now in the the third column...simply adjust your function to reference the 3rd column and you are set.  Your function should look like the following:

State
=VLOOKUP(F9,GA,3)

Open in new window

City
=VLOOKUP(F9,GA,2)

Open in new window



Let me know if you have any other questions.
0
 

Author Comment

by:darrellbuckley
ID: 40554291
Yahtzee! Thanks Jim, its working.
0
 

Author Closing Comment

by:darrellbuckley
ID: 40554293
Great Help!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question