Home » Category » Microsoft Excel

Microsoft Excel: Zip Code Lookup Add-in

205| Thu, 22 May 2008 20:40:00 GMT| anonymous| Comments (12)
Does anyone know of an add-in that will return a valid zip code whe
given a street address, city and state

--
GoFigur
----
GoFigure's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=427
View this thread: http://www.excelforum.com/showthread.php?threadid=49333

Keywords & Tags: zip, code, lookup, add-in, microsoft, excel

URL: http://www.developertags.com/microsoft-excel/495083/
 
«« Prev - Next »» 12 helpful answers below.
I would have thought the UPS web page was better suited for this job.
--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"GoFigure" <GoFigure.2011en_1134558602.6627...excelforum-nospam.com> wrote in
message news:GoFigure.2011en_1134558602.6627...excelforum-nospam.com...
> Does anyone know of an add-in that will return a valid zip code when
> given a street address, city and state?
>
> --
> GoFigure
> ---
> GoFigure's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=4274
> View this thread: http://www.excelforum.com/showthread.php?threadid=493332
>

bob | Thu, 22 May 2008 20:41:00 GMT |

Sure but if one has many addresses (20 - 100) and one does this on
weekly basis, it becomes a tedious time-waster.
- Al

Bob Phillips Wrote:
> I would have thought the UPS web page was better suited for this job.
> --
> HTH
> Bob Phillips
>
GoFigur
----
GoFigure's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=427
View this thread: http://www.excelforum.com/showthread.php?threadid=49333

gofigure | Thu, 22 May 2008 20:42:00 GMT |

MS's MapPoint can lookup zip codes. Of course I don't expect you have it
but if you were desperate enough...

Sub TestShowZip()
Dim Street As String
Dim City As String
Dim State As String
Street = "417 Robinson"
City = "North Tonawanda"
State = "NY"
ShowZip Street, City, State
End Sub

Sub ShowZip(Street As String, City As String, State As String)
Dim MApp As MapPoint.Application
Dim MMap As MapPoint.Map
Dim Loc As MapPoint.Location
Set MApp = New MapPoint.Application
Set MMap = MApp.ActiveMap
Set Loc = MMap.FindAddress(Street, City, State)
If Not Loc Is Nothing Then _
MsgBox Loc.StreetAddress.PostalCode
End Sub
Jim
"GoFigure" <GoFigure.2013pz_1134561602.5905...excelforum-nospam.com> wrote in
message news:GoFigure.2013pz_1134561602.5905...excelforum-nospam.com...
|
| Sure but if one has many addresses (20 - 100) and one does this on a
| weekly basis, it becomes a tedious time-waster.
|
| - Al
|
| Bob Phillips Wrote:
| > I would have thought the UPS web page was better suited for this job.
| >
| > --
| > HTH
| >
| > Bob Phillips
| >
| >
|
|
| --
| GoFigure
| ---
| GoFigure's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=4274
| View this thread: http://www.excelforum.com/showthread.php?threadid=493332
|

jim | Thu, 22 May 2008 20:43:00 GMT |

I have a worksheet here at work which does this. Let me know if you would
like mailed or forwarded.

NMG

"Jim Rech" wrote:

> MS's MapPoint can lookup zip codes. Of course I don't expect you have it
> but if you were desperate enough...
> Sub TestShowZip()
> Dim Street As String
> Dim City As String
> Dim State As String
> Street = "417 Robinson"
> City = "North Tonawanda"
> State = "NY"
> ShowZip Street, City, State
> End Sub
> Sub ShowZip(Street As String, City As String, State As String)
> Dim MApp As MapPoint.Application
> Dim MMap As MapPoint.Map
> Dim Loc As MapPoint.Location
> Set MApp = New MapPoint.Application
> Set MMap = MApp.ActiveMap
> Set Loc = MMap.FindAddress(Street, City, State)
> If Not Loc Is Nothing Then _
> MsgBox Loc.StreetAddress.PostalCode
> End Sub
>
> --
> Jim
> "GoFigure" <GoFigure.2013pz_1134561602.5905...excelforum-nospam.com> wrote in
> message news:GoFigure.2013pz_1134561602.5905...excelforum-nospam.com...
> |
> | Sure but if one has many addresses (20 - 100) and one does this on a
> | weekly basis, it becomes a tedious time-waster.
> |
> | - Al
> |
> | Bob Phillips Wrote:
> | > I would have thought the UPS web page was better suited for this job.
> | >
> | > --
> | > HTH
> | >
> | > Bob Phillips
> | >
> | >
> |
> |
> | --
> | GoFigure
> | ---
> | GoFigure's Profile:
> http://www.excelforum.com/member.php?action=getinfo&userid=4274
> | View this thread: http://www.excelforum.com/showthread.php?threadid=493332
> |
>
>

neilmitchellgoodson | Thu, 22 May 2008 20:45:00 GMT |

Neil, if you'd be so kind to email it 'aavery...eni.net
(aavery...eni.net), I'd like to take a look at it.

Jim, yes, I do have MapPoint. I bought it because I thought it'd b
better than Streets & Trips. Was I disappointed.

Thanks,
- A
--
GoFigur
----
GoFigure's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=427
View this thread: http://www.excelforum.com/showthread.php?threadid=49333

gofigure | Thu, 22 May 2008 20:45:00 GMT |

>>I do have MapPoint.

How about that? I forgot to mention that you have to set a reference to
MapPoint under Tools, References in the VBE to run my code.
--
Jim
"GoFigure" <GoFigure.201blb_1134571801.7275...excelforum-nospam.com> wrote in
message news:GoFigure.201blb_1134571801.7275...excelforum-nospam.com...
|
| Neil, if you'd be so kind to email it 'aavery...eni.net '
| (aavery...eni.net), I'd like to take a look at it.
|
| Jim, yes, I do have MapPoint. I bought it because I thought it'd be
| better than Streets & Trips. Was I disappointed.
|
| Thanks,
|
| - Al
|
|
| --
| GoFigure
| ---
| GoFigure's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=4274
| View this thread: http://www.excelforum.com/showthread.php?threadid=493332
|

jim | Thu, 22 May 2008 20:46:00 GMT |

Thanks, Jim.
- Al

Jim Rech Wrote:
> >>I do have MapPoint.
> How about that? I forgot to mention that you have to set a referenc
> to
> MapPoint under Tools, References in the VBE to run my code.
> --
> Ji
--
GoFigur
----
GoFigure's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=427
View this thread: http://www.excelforum.com/showthread.php?threadid=49333

gofigure | Thu, 22 May 2008 20:47:00 GMT |

Hi,
Took another look at mine and it doesn't drill down to individual address
level, just area, county, state etc. Sorry!

"GoFigure" wrote:

> Thanks, Jim.
> - Al
> Jim Rech Wrote:
> > >>I do have MapPoint.
> >
> > How about that? I forgot to mention that you have to set a reference
> > to
> > MapPoint under Tools, References in the VBE to run my code.
> >
> > --
> > Jim
>
> --
> GoFigure
> ---
> GoFigure's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=4274
> View this thread: http://www.excelforum.com/showthread.php?threadid=493332
>

neilmitchellgoodson | Thu, 22 May 2008 20:49:00 GMT |

Thanks anyway for your offer Neil.
- Al

Neil Mitchell-Goodson Wrote:
> Hi,
> Took another look at mine and it doesn't drill down to individual
> address
> level, just area, county, state etc. Sorry!
>
GoFigure
---
GoFigure's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=4274
View this thread: http://www.excelforum.com/showthread.php?threadid=493332

gofigure | Thu, 22 May 2008 20:50:00 GMT |

This code wors great forfinding zipcodes. can it be modified to return the
zipcode to a cell rather then message box. I have a spreadsheet i do once a
month with 200-300 address missing zips. I need to automate the process of
inputing this data . Thanks for your help
Duane Reynolds

"Jim Rech" wrote:

> MS's MapPoint can lookup zip codes. Of course I don't expect you have it
> but if you were desperate enough...
> Sub TestShowZip()
> Dim Street As String
> Dim City As String
> Dim State As String
> Street = "417 Robinson"
> City = "North Tonawanda"
> State = "NY"
> ShowZip Street, City, State
> End Sub
> Sub ShowZip(Street As String, City As String, State As String)
> Dim MApp As MapPoint.Application
> Dim MMap As MapPoint.Map
> Dim Loc As MapPoint.Location
> Set MApp = New MapPoint.Application
> Set MMap = MApp.ActiveMap
> Set Loc = MMap.FindAddress(Street, City, State)
> If Not Loc Is Nothing Then _
> MsgBox Loc.StreetAddress.PostalCode
> End Sub
>
> --
> Jim
> "GoFigure" <GoFigure.2013pz_1134561602.5905...excelforum-nospam.com> wrote in
> message news:GoFigure.2013pz_1134561602.5905...excelforum-nospam.com...
> |
> | Sure but if one has many addresses (20 - 100) and one does this on a
> | weekly basis, it becomes a tedious time-waster.
> |
> | - Al
> |
> | Bob Phillips Wrote:
> | > I would have thought the UPS web page was better suited for this job.
> | >
> | > --
> | > HTH
> | >
> | > Bob Phillips
> | >
> | >
> |
> |
> | --
> | GoFigure
> | ---
> | GoFigure's Profile:
> http://www.excelforum.com/member.php?action=getinfo&userid=4274
> | View this thread: http://www.excelforum.com/showthread.php?threadid=493332
> |
>
>

duane | Thu, 22 May 2008 20:50:00 GMT |

I don't have mappoint installed, so this is untested:

Option Explicit
Dim MApp As MapPoint.Application
Dim MMap As MapPoint.Map
Sub TestShowZip()
Dim myRng As Range
Dim myCell As Range
Dim Street As String
Dim City As String
Dim State As String

With ActiveSheet
Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
End With

For Each myCell In myRng.Cells
Street = myCell.Value
City = myCell.Offset(0, 1).Value
State = myCell.Offset(0, 3).Value
myCell.Offset(0, 5).Value = ShowZip(Street, City, State)
Next myCell
End Sub
Function ShowZip(Street As String, City As String, State As String) As String

Dim Loc As MapPoint.Location

If MApp Is Nothing Then
Set MApp = New MapPoint.Application
End If

If MMap Is Nothing Then
Set MMap = MApp.ActiveMap
End If

Set Loc = MMap.FindAddress(Street, City, State)
If Loc Is Nothing Then
ShowZip = ""
Else
ShowZip = Loc.StreetAddress.PostalCode
End If
End Function

You'll have to change how it picks up the city, street and state, though--and
where to put the zipcode.

Duane Reynolds wrote:
> This code wors great forfinding zipcodes. can it be modified to return the
> zipcode to a cell rather then message box. I have a spreadsheet i do once a
> month with 200-300 address missing zips. I need to automate the process of
> inputing this data . Thanks for your help
> Duane Reynolds
> "Jim Rech" wrote:
> > MS's MapPoint can lookup zip codes. Of course I don't expect you have it
> > but if you were desperate enough...
> >
> > Sub TestShowZip()
> > Dim Street As String
> > Dim City As String
> > Dim State As String
> > Street = "417 Robinson"
> > City = "North Tonawanda"
> > State = "NY"
> > ShowZip Street, City, State
> > End Sub
> >
> > Sub ShowZip(Street As String, City As String, State As String)
> > Dim MApp As MapPoint.Application
> > Dim MMap As MapPoint.Map
> > Dim Loc As MapPoint.Location
> > Set MApp = New MapPoint.Application
> > Set MMap = MApp.ActiveMap
> > Set Loc = MMap.FindAddress(Street, City, State)
> > If Not Loc Is Nothing Then _
> > MsgBox Loc.StreetAddress.PostalCode
> > End Sub
> >
> >
> > --
> > Jim
> > "GoFigure" <GoFigure.2013pz_1134561602.5905...excelforum-nospam.com> wrote in
> > message news:GoFigure.2013pz_1134561602.5905...excelforum-nospam.com...
> > |
> > | Sure but if one has many addresses (20 - 100) and one does this on a
> > | weekly basis, it becomes a tedious time-waster.
> > |
> > | - Al
> > |
> > | Bob Phillips Wrote:
> > | > I would have thought the UPS web page was better suited for this job.
> > | >
> > | > --
> > | > HTH
> > | >
> > | > Bob Phillips
> > | >
> > | >
> > |
> > |
> > | --
> > | GoFigure
> > | ---
> > | GoFigure's Profile:
> > http://www.excelforum.com/member.php?action=getinfo&userid=4274
> > | View this thread: http://www.excelforum.com/showthread.php?threadid=493332
> > |
> >
> >
> >
--

Dave Peterson

dave | Thu, 22 May 2008 20:52:00 GMT |

Your updated code works perfecly Dave!!!!!!! I can not thank you enough for
your help.

Duane
"Dave Peterson" <petersod...verizonXSPAM.net> wrote in message
news:43FA1EE9.E405C777...verizonXSPAM.net...
>I don't have mappoint installed, so this is untested:
> Option Explicit
> Dim MApp As MapPoint.Application
> Dim MMap As MapPoint.Map
> Sub TestShowZip()
> Dim myRng As Range
> Dim myCell As Range
> Dim Street As String
> Dim City As String
> Dim State As String
> With ActiveSheet
> Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
> End With
> For Each myCell In myRng.Cells
> Street = myCell.Value
> City = myCell.Offset(0, 1).Value
> State = myCell.Offset(0, 3).Value
> myCell.Offset(0, 5).Value = ShowZip(Street, City, State)
> Next myCell
> End Sub
> Function ShowZip(Street As String, City As String, State As String) As
> String
> Dim Loc As MapPoint.Location
> If MApp Is Nothing Then
> Set MApp = New MapPoint.Application
> End If
> If MMap Is Nothing Then
> Set MMap = MApp.ActiveMap
> End If
> Set Loc = MMap.FindAddress(Street, City, State)
> If Loc Is Nothing Then
> ShowZip = ""
> Else
> ShowZip = Loc.StreetAddress.PostalCode
> End If
> End Function
> You'll have to change how it picks up the city, street and state,
> though--and
> where to put the zipcode.
>
> Duane Reynolds wrote:
>> This code wors great forfinding zipcodes. can it be modified to return
>> the
>> zipcode to a cell rather then message box. I have a spreadsheet i do once
>> a
>> month with 200-300 address missing zips. I need to automate the process
>> of
>> inputing this data . Thanks for your help
>> Duane Reynolds
>> "Jim Rech" wrote:
>> > MS's MapPoint can lookup zip codes. Of course I don't expect you have
>> > it
>> > but if you were desperate enough...
>> >
>> > Sub TestShowZip()
>> > Dim Street As String
>> > Dim City As String
>> > Dim State As String
>> > Street = "417 Robinson"
>> > City = "North Tonawanda"
>> > State = "NY"
>> > ShowZip Street, City, State
>> > End Sub
>> >
>> > Sub ShowZip(Street As String, City As String, State As String)
>> > Dim MApp As MapPoint.Application
>> > Dim MMap As MapPoint.Map
>> > Dim Loc As MapPoint.Location
>> > Set MApp = New MapPoint.Application
>> > Set MMap = MApp.ActiveMap
>> > Set Loc = MMap.FindAddress(Street, City, State)
>> > If Not Loc Is Nothing Then _
>> > MsgBox Loc.StreetAddress.PostalCode
>> > End Sub
>> >
>> >
>> > --
>> > Jim
>> > "GoFigure" <GoFigure.2013pz_1134561602.5905...excelforum-nospam.com>
>> > wrote in
>> > message news:GoFigure.2013pz_1134561602.5905...excelforum-nospam.com...
>> > |
>> > | Sure but if one has many addresses (20 - 100) and one does this on a
>> > | weekly basis, it becomes a tedious time-waster.
>> > |
>> > | - Al
>> > |
>> > | Bob Phillips Wrote:
>> > | > I would have thought the UPS web page was better suited for this
>> > job.
>> > | >
>> > | > --
>> > | > HTH
>> > | >
>> > | > Bob Phillips
>> > | >
>> > | >
>> > |
>> > |
>> > | --
>> > | GoFigure
>> > | ---
>> > | GoFigure's Profile:
>> > http://www.excelforum.com/member.php?action=getinfo&userid=4274
>> > | View this thread:
>> > http://www.excelforum.com/showthread.php?threadid=493332
>> > |
>> >
>> >
>> >
> --
> Dave Peterson

duane | Thu, 22 May 2008 20:53:00 GMT |

Microsoft Excel Hot Answers

Microsoft Excel New questions

Microsoft Excel Related Categories