Solved

Excel 2010

Posted on 2015-01-16
8
94 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 4

Expert Comment

by:Jim Riddles
Comment Utility
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
Comment Utility
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
Comment Utility
=VLOOKUP(F11,GA,2)
0
 
LVL 4

Expert Comment

by:Jim Riddles
Comment Utility
Is it possible to share your sheet?  I will troubleshoot it for you.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:darrellbuckley
Comment Utility
0
 
LVL 4

Accepted Solution

by:
Jim Riddles earned 500 total points
Comment Utility
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
Comment Utility
Yahtzee! Thanks Jim, its working.
0
 

Author Closing Comment

by:darrellbuckley
Comment Utility
Great Help!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now