+ Reply to Thread
Results 1 to 6 of 6

Data Cleansing- How to fix errors in text

  1. #1
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Data Cleansing- How to fix errors in text

    Hi, I have data of street names in a column, the street names contains various type errors (e.g. St for when it should be Street, and Rd for when it should be road), I know I can correct each of the cells containing the type errors using either an If formula or a Substitute formula, however, I can only correct one error at a time, for instance, first I would have to correct the "St" with "Street" error using an If formula, then copy that corrected column and pasted it into a new column, and apply another if formula to correct the "Rd" with "Road" error, is there anyway I can correct all the various type errors (St and Rd) using only onw formula which could be dragged down the entire street column, to fix all errors?

    Would much appreciate the help.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Data Cleansing- How to fix errors in text

    Hello & Welcome to the Forum,

    How about...

    =SUBSTITUTE(SUBSTITUTE(A1,"St","Street"),"Rd","Road")
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Re: Data Cleansing- How to fix errors in text

    Its a good formula but the only problem with it is that for the cells containing Street already in the original column, the return is "Streetreet ", Is there a way to fix this

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Data Cleansing- How to fix errors in text

    Maybe something like...

    =IF(SUMPRODUCT(--ISNUMBER(SEARCH({"Street","Road"},A1))),A1,SUBSTITUTE(SUBSTITUTE(A1,"St","Street"),"Rd","Road"))

  5. #5
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Re: Data Cleansing- How to fix errors in text

    Thanks that is great

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Data Cleansing- How to fix errors in text

    You're welcome…glad it worked out for you and thanks for the feedback...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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