View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Filling Zip by City

First of all, you would need some table of the various cities and
their zip codes (and this assumes that there is but one zip code per
city). Suppose that data table is in K1:L100, with city names in
column K and zip codes in column L. Then, you could use the VLOOKUP
function to loop up the city in column K and get the corresponding zip
code from column L. If your city names that need zip codes assigned to
them are in A1:A100, enter

=VLOOKUP(A1,K$1:L$100,2,FALSE)

in cell B1 and fill down to B100.

You should probably provide more detail about what you have and what
you need to do.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Tue, 11 Nov 2008 10:12:02 -0800, Perry
wrote:

How do code to Fill Cells "Zip" by entering the city name in previous cell?