cityzip(
CITY
,
STATE
)

The cityzip( function returns the lowest zip code associated with a city.


Parameters

This function has two parameters:

city – city to look up.

state – state the city is in, expressed as a case-insensitive two-letter code.


Description

This function returns the lowest zip code associated with a city. This is usually (but not always) the central zip code of the city.

cityzip("New York","NY") ☞ 10001
cityzip("Fairbanks","AK") ☞ 99701
cityzip("North Pole","ak") ☞ 99705

If the city doesn’t exist or if an invalid state code is entered, an empty string is returned.

cityzip("South Pole","AK") ☞ 
cityzip("Fairbanks","Alaska") ☞ 

Note: The cityzip( function is much slower than the city( function, in fact, it is thousands of times slower. So you may want to avoid using it in repetitive situations like with the formulafill or select statements.


See Also


History

VersionStatusNotes
10.0NewNew in this version.