+ Reply to Thread
Results 1 to 3 of 3

Address cleansing using VBA

  1. #1
    Registered User
    Join Date
    10-24-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010 @ work, 2013 at home
    Posts
    3

    Address cleansing using VBA

    Hi all, thanks for your help. I have a spreadsheet that uses INDEX(MATCH()) to validate data fields between two databases that I maintain. I want to get rid of false positives in checking addresses by Find and Replacing common address suffixes to standardize the data in both sets. I found a list of common incorrect suffixes and their correct counterparts and scraped it off of the USPS website and into Excel. I want to manipulate a macro to search any part of the address field and find and replace the full or common suffix with the USPS standard suffix. An example would be: Circle with Cir. I have a macro that will only find the suffix if it's alone in a field. I need it to search any part of a field. Can you help? Here's what I'm working with:

    Please Login or Register  to view this content.
    Attached is a list of the suffixes I want to cleanse. Suffixes.xlsx

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Address cleansing using VBA

    Hi,

    Just a thought. Have you tried incorporating the wildcard character *. e.g

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

    Incidentally I'm intrigued to see you've used the colloquialism 'nowt' for nothing. Is that a regular expression in CA?
    Over here it's generally associated with people from Yorkshire, aka God's own county (and the UK's largest) and most commonly heard in the expression

    If ivver tha does owt fir nowt - do it fir thissen. (In translation: If you ever do something for nothing, do it for yourself).
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-24-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010 @ work, 2013 at home
    Posts
    3

    Re: Address cleansing using VBA

    Swiped that bit of code from here: http://www.mrexcel.com/forum/excel-q...-function.html

    Maybe you and Mr. WillR have a thing or two in common. I haven't heard that expression around these parts.

    When I record the macro for one instance of the thing I want it to do, it looks like this:
    Please Login or Register  to view this content.
    How do I scale that up/ mash it in with the previous bit of code to get it to work for all of the entries in a list?

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Data cleansing using Macros .....
    By Ilikeideas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 06:52 AM
  2. Duplicate cleansing
    By Imance in forum Excel General
    Replies: 2
    Last Post: 11-16-2012, 01:34 AM
  3. Macro For Cleansing
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-30-2011, 01:38 PM
  4. Data cleansing question
    By jaybeethebeefy in forum Excel General
    Replies: 3
    Last Post: 12-28-2011, 10:53 AM
  5. Cleansing for CRM uploads
    By Daniel Dimmock in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-14-2005, 07:06 AM

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