Solved

Excel 2010

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

Expert Comment

by:Jim Riddles
ID: 40554221
Is it possible to share your sheet?  I will troubleshoot it for you.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:darrellbuckley
ID: 40554235
0
 
LVL 4

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 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

20 Experts available now in Live!

Get 1:1 Help Now