+ Reply to Thread
Results 1 to 11 of 11

Separating street number from street name

  1. #1
    Registered User
    Join Date
    07-15-2015
    Location
    australia
    MS-Off Ver
    2010
    Posts
    11

    Separating street number from street name

    Hi Guys
    if I have a column with some sell have the street number front of the street name and others have only the street name and I want to get rid of all the numbers on front of the street name without individually go to every cell and delete it.
    is there a formula help me do that. sheet attached
    thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Separating street number from street name

    If your numbers (if they exist) are always at the beginning of the address, then you just need to see if the first character is a number - if it is then remove everything before (and including) the first space, otherwise leave it alone. This is what this formula does in B1:

    =IF(ISNUMBER(--LEFT(A1)),RIGHT(A1,LEN(A1)-FIND(" ",A1)),A1)

    Copy it down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Separating street number from street name

    Or,

    =TRIM(SUBSTITUTE(A1,LEFT(A1,SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6,7,8,9},""))))),""))

  4. #4
    Registered User
    Join Date
    07-15-2015
    Location
    australia
    MS-Off Ver
    2010
    Posts
    11

    Re: Separating street number from street name

    Jesus
    it works
    pete_uk please explain it to me in more details

  5. #5
    Registered User
    Join Date
    07-15-2015
    Location
    australia
    MS-Off Ver
    2010
    Posts
    11

    Re: Separating street number from street name

    Berlan
    not very used on sumproduct function.. to high for me. thanks

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Separating street number from street name

    I don't know what more detail I can give you that isn't in my explanation.

    LEFT(A1) looks at the first character in cell A1. By surrounding this with ISNUMBER(-- and ), this tests to see if that first character is a number. If it is then you want to take the RIGHT hand part of A1 - the number of characters you want to take is given by the LENgth of the string minus the position where you can FIND the first space. If the first character of A1 is not a number then just take A1 as it is.

    Hope this helps.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    @Berlan - thanks for the rep.

    Pete

  7. #7
    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
    52,926

    Re: Separating street number from street name

    Using Pet's formula...
    =IF(ISNUMBER(--LEFT(A1)),Find(" ",A1)-1),A1)
    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

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Separating street number from street name

    Welcome to the forum.

    In addition to Pete's formula (a good one by the way) I found that this also works:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Explanation:
    If the leftmost character is a number which is determined by ISNUMBER(--LEFT(A1)) LEFT(A1) will extract the first character of the string but regardless of being a number or a letter, it will be text. --LEFT(A1) will force the character if a number to be a number. The ISNUMBER(--LEFT(A1) is used to create a TRUE or FALSE for the IF. If the first character is a number then this will be TRUE and the TRUE part of the formula is returned.

    TRUE PART OF THE IF FORMULA:
    MID(A1,FIND(" ",A1)+1,30)
    The MID function returns values from the middle of a string of characters. The first argument is WHAT STRING, followed by where to start, and finally how many characters.

    FALSE PART OF THE IF FORMULA:
    This is simply the original cell (A1) in this case.

    I hope that is has been understandable.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Separating street number from street name

    Hi Ron,

    30 might not be enough characters - I would suggest 255, so really you are saying "to the end of the string".

    Pete

  10. #10
    Registered User
    Join Date
    07-15-2015
    Location
    australia
    MS-Off Ver
    2010
    Posts
    11

    Re: Separating street number from street name

    Thank you guys Alllll

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Separating street number from street name

    I just used 30 it could well have been 3000 as MID will truncate it. 30 was enough for the demo.

    I probably should have used more than 30.

    Thanks Pete.

+ 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. Separating Street Address City State Zip that only contain spaces
    By tp5887 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2015, 02:52 PM
  2. [SOLVED] Trying to separate street number and street name into columns
    By greenmat in forum Excel General
    Replies: 7
    Last Post: 07-27-2012, 04:24 PM
  3. separate street address and street number
    By iwanttoplaywii in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-24-2011, 09:45 PM
  4. Separate street name and number
    By freeman83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2010, 07:55 AM
  5. extract street number from address
    By rickshadey in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-23-2008, 08:51 PM
  6. how do I convert cell 'Street,#' to '# Street' these are addresse
    By Closing hyperlinked wookbooks upon exit in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-30-2006, 06:23 AM
  7. [SOLVED] How do I sort a column of street number/street name by the stree.
    By JHoleman1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2005, 09:06 PM

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