ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I am a novice at using functions (https://www.excelbanter.com/excel-worksheet-functions/246287-i-am-novice-using-functions.html)

april

I am a novice at using functions
 
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

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

Ms-Exl-Learner

I am a novice at using functions
 
whether both of the data (i.e.) Name and zip is present in somewhere of your
workbook?

Like this
Hendersonville, TN 37075

--------------------
(Ms-Exl-Learner)
--------------------



"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.


Glenn

I am a novice at using functions
 
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.



But Hendersonville has two zip codes...37075 and 37077. And what about
Nashville, which lists 37201 through 37222, 37224, 37227 through 37230, 37232
and 37234 through 37250 for a total of 45 options.


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com