View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default I am a novice at using functions

If you only had a couple of choices for the city/state, you could use a few
=If()'s.

But after even a few entries, this becomes difficult.

I'd create a new sheet and put the city/states in column A and the zips in
column B.

Then I could use =vlookup() to retrieve the zipcodes.

=if(a1="","",vlookup(a1,sheet2!a:b,2,false)

Debra Dalgleish has lots of notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://contextures.com/xlFunctions02.html#Trouble



April wrote:

But I am do a function like this - if column A equals Hendersonville, TN,
then I want Excel to automatically enter the zip of 37075.

How would I write that? Thanks for the help.


--

Dave Peterson