+ Reply to Thread
Results 1 to 9 of 9

Address Column has unwanted informtion

  1. #1
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    532

    Address Column has unwanted informtion

    My addresses have a - then a number after the real number. see attachment.
    As example: 3288 - 101 MAIN ST
    Should be 328 Main St

    Windows 10, Excel 2016

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Address Column has unwanted informtion

    Hi, if only want to get rid of " - "

    Then it will be = SUBSTITUTE(F2, " - ", " ")

    if there are other unwanted characters, symbol then will need to use other methods
    Christopher Yap

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,675

    Re: Address Column has unwanted informtion

    Try:
    Please Login or Register  to view this content.
    Quang PT

  4. #4
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    532

    Re: Address Column has unwanted informtion

    Thank you. The first answer only took the "-" out and not the number that followed. The second formula worked. Thank you

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Address Column has unwanted informtion

    Please try

    =REPLACE(F1,FIND("-",F1&"-"),MATCH(0,-MID(F1&"-0",FIND("-",F1&"-")+1,ROW(A$1:A$9))),)
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-06-2015
    Location
    houston, tx
    MS-Off Ver
    MS 365
    Posts
    532

    Re: Address Column has unwanted informtion

    Yes. it works also. Thanks

  7. #7
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Address Column has unwanted informtion

    Hi Bo_Ry, Bebo

    if F1 = 3288 - 10122222 MAIN ST

    =REPLACE(F1,FIND("-",F1&"-"),MATCH(0,-MID(F1&"-0",FIND("-",F1&"-")+1,ROW(A$1:A$9))),) will be incorrect

    3288 2- MAIN ST

    For =IFERROR(TRIM(SUBSTITUTE(SUBSTITUTE(F1,AGGREGATE(14,6,TRIM(MID(F1,SEARCH("-",F1)+2,{1,2,3,4,5,6,7,8,9}))+0,1),""),"-","")),F1)
    if F1 = 3288 - XZA MAIN ST
    if will be 3288 - XZA MAIN ST

    So really depending on the actually data, there may be other scenarios

    Perhaps VBA or Power Query can cover most of the different data cases,

    Just my 10 cents comments

  8. #8
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Address Column has unwanted informtion

    Hi All,

    Just for information some possible solution using Power Query

    the custom column

    if Text.Contains([Column6],"-") then (Text.BeforeDelimiter([Column6], " ") & "" & Text.AfterDelimiter([Column6], "-",{0, RelativePosition.FromEnd})) else [Column6]
    Attached Files Attached Files

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Address Column has unwanted informtion

    Quote Originally Posted by bluesky63 View Post
    Hi Bo_Ry, Bebo

    if F1 = 3288 - 10122222 MAIN ST

    =REPLACE(F1,FIND("-",F1&"-"),MATCH(0,-MID(F1&"-0",FIND("-",F1&"-")+1,ROW(A$1:A$9))),) will be incorrect

    3288 2- MAIN ST
    Depend on data, Just add some more condition


    =SUBSTITUTE(REPLACE(F2,FIND("-",F2&"-"),MATCH(0,-MID(F2&"-0",FIND("-",F2&"-")+1,ROW(A$1:A$99)))+1,),"- ",)
    Attached Files Attached Files

+ 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] Need help cleaning up a column from unwanted value
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2019, 07:08 AM
  2. Replies: 12
    Last Post: 03-05-2019, 12:08 PM
  3. [SOLVED] Using Address Function to create an address referencing the entire column
    By OliverS in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-28-2015, 01:06 AM
  4. [SOLVED] Help on how to pull out informtion out of a row
    By yorkierose in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2014, 05:10 AM
  5. [SOLVED] [URGENT HELP REQUIRED] Macro to group informtion together
    By eoghanmolloy in forum Excel Programming / VBA / Macros
    Replies: 81
    Last Post: 12-17-2012, 06:45 AM
  6. Converting a complete, single column address into separate columns for ADDRESS, CITY, ST,
    By jeffrogerssn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 10:34 AM
  7. changing cell address to row/column address
    By michaelbails in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-30-2010, 09:47 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