SlowPoke wrote:
I want a formula or vb script that would insert a zipcode in one cell
when I put the city in an adjacent cell.
Cell 1 Cell 2
Culpeper 22701
Depending on how involved your list of cities would be, there are two
ways that I know of to accomplish this. If this is to be used on a
national type basis (All cities in the U.S. then you would have to
construct a table with two columns. One would contain the city name,
the second the corresponding Zip. You could then use data validation
to lookup the appropriate code. Another way would be to use code
behind the scenes and a SelectCase or Choose statement. I wouldn't do
this unless I had 20 cities or less to work with though. Hope that
helps