Closed Thread
Results 1 to 16 of 16

Pull USPS address to excel

  1. #1
    Registered User
    Join Date
    08-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Post Pull USPS address to excel

    Hi Experts,

    I'm looking for your help to get the address from USPS.com ( https://tools.usps.com/go/ZipLookupAction!input.action)

    I have the Street Address in Range "A1" and City in "A2" and State in "A3" and ZIP in "A4"

    I need to validate the address with USPS.com

    So I am looking for VBA code to open the USPS site and enter the the data as mentioned in Range A1,A2,A3,A4 and retrive the correct address in Range B1,B2,B3,B4

    Is this Possible. Looking for your advice.

    Thanks in advance,
    Sakthivel

  2. #2
    Registered User
    Join Date
    08-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Pull USPS address to excel

    got the codes

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Pull USPS address to excel

    If you've
    got the codes
    please share it with all of us...
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    08-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Pull USPS address to excel

    With Pleasure John

    Note:
    My Sheet Name is Address
    the given address range is
    c409 - Street Address
    c410 - City:
    c412 - ZIP:

    *****The Code ********

    Please Login or Register  to view this content.
    ****end****

    Pleaes let me know if its working for you also
    Last edited by Sakthivel85; 09-22-2013 at 04:33 PM.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Pull USPS address to excel

    Hi Sakthivel

    Thank you for sharing...please wrap your Code in Code Tags such that others can share the Code...good work!

  6. #6
    Registered User
    Join Date
    08-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Pull USPS address to excel

    I'm Ready
    But I'm new to this kind of websites . so how to Code in Code Tags ?

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Pull USPS address to excel

    Quote Originally Posted by Sakthivel85 View Post
    I'm Ready
    But I'm new to this kind of websites . so how to Code in Code Tags ?

    You just highlight the code and click on the #
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  8. #8
    Registered User
    Join Date
    08-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Pull USPS address to excel

    I did code Tags

  9. #9
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Pull USPS address to excel

    I am using Excel 2013 and I am having some issues with the code.
    Dim IE As New InternetExplorer: Compile Error: User-defined type not defined (So I commented this out and it seemed to work)
    zipcode.Item(0).Value = myzip: Run-time error'91': Object variable or With block not set

    Would you be able to post an xlsm file that has the code in it and working?

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Pull USPS address to excel

    Hi Mr. Rhodes,

    Welcome to the forum - but, instead of using the reply you need to start your own thread - it's easy, just go to the programming forum and click on "Post New Thread"

  11. #11
    Registered User
    Join Date
    01-19-2018
    Location
    TN
    MS-Off Ver
    2013
    Posts
    1

    Re: Pull USPS address to excel

    Thought I'd share and pay the good work done thus far forward for the next person looking to validate some addresses. I had about 1000 addresses to validate (all in A-E). Code below runs through rows that you specifiy (see For r = xxx to xxx) returns the validated address (if found) back to (G-K). The USPS web times out after every so often, but I just re-sort the blanks to the bottom, change the rows, and re-run.

    Thanks for this forum/thread...

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    07-16-2019
    Location
    Houston
    MS-Off Ver
    7
    Posts
    2

    Re: Pull USPS address to excel

    Thanks for the updated code fastintruder.

    They updated the site and I'm trying to work thru the changes.

    I updated:

    R value

    Commented out state since its now a drop down and not necessary.

    Removed ' from zip, updated new name

    Updated new button name

    So it all works to grab info from excel, go to ie, enter address and validate it. It shows validated address but it's not in a format I'm not sure how to get that back to excel?

    Any thoughts?

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Pull USPS address to excel

    Administrative Note:

    Jcjoines Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  14. #14
    Registered User
    Join Date
    07-16-2019
    Location
    Houston
    MS-Off Ver
    7
    Posts
    2

    Re: Pull USPS address to excel

    No problem I can start a new post.

    Just didnt feel like i violated anything. My post is nothing new and is 100% related to the OPs post. Its just the USPS website has changed. Seems to me the up to date code for the OPs post would be perfect for this thread.

    No problem though

  15. #15
    Registered User
    Join Date
    05-06-2020
    Location
    Dallas
    MS-Off Ver
    Microsoft office professional plus 2016
    Posts
    1

    Re: Pull USPS address to excel

    Hi Experts,
    I want to validate 340 addresses from USPS.
    My excel sheet contains header as fllows:
    A1- Street
    B2-City
    C3- State
    D4- ZIP

    Could you please send me codes.

    Regards,
    Sunil

  16. #16
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation Re: Pull USPS address to excel


    Hi,

    just well read post #13 …

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extracting the class C address from an IP address via a formula in Excel
    By floep in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2023, 05:53 PM
  2. Trying to pull off a custom address mail merge process!
    By comptechbranden in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2007, 10:51 PM
  3. [SOLVED] Pull in address from another worksheet
    By S. Hernandez in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-31-2006, 11:13 AM
  4. [SOLVED] I want to pull out certain address in excel and put into a file
    By neiled in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2005, 04:05 PM
  5. I want to pull out companies without an email address?
    By Pudlicious in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-15-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1