+ Reply to Thread
Results 1 to 7 of 7

Converting an address in one cell into multiple cells

  1. #1
    Registered User
    Join Date
    03-11-2014
    Location
    Roseville California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Converting an address in one cell into multiple cells

    Hello everyone!

    If anyone can help me out with this I'll mail you a beer!

    I have a list of addresses in this format: Firstname Lastname 123 Paved Rd City, ST 12345-6789
    And since every address is different, i cant use the spaces to set the beginning and end of data to extract, example : 123 Stone Paved Dr Rock City, 123 Red Stone Paved Blvd Town City Center, etc:

    I need a formula to convert them all into separate cells as follows: [Firstname Lastname] [123 Paved Rd] [City] [ST] [12345]

    I have a formula for the name, but making one for the address that will work is giving me trouble. I need a formula that sets the second blank after the Lastname as the beginning for the address and because street names vary, it needs to look for " Rd " or " St " or " Ave " or " Blvd " etc for the end position...is this possible?
    And can that address be used to distinguish where the city name begins?

    Any help would be much appreciated. I'm rather new to excel but I'm talented at Photoshop and would gladly do some work for anyone that can help. I have attached what I have so far, with three half finished versions of my attempts.

    Thanks,
    Kenny
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Converting an address in one cell into multiple cells

    It would help us if you can tell us what elements of the string will be constant, and which are variable

    For example - It will always end in 10 char zip code
    prior to zip code will always be 2 char state code
    city - is variable, either one or two words (separated with a " ")
    address - is variable, either one, two or three words (separated with a " ")
    name - is always two words, never one or more than three

  3. #3
    Registered User
    Join Date
    03-11-2014
    Location
    Roseville California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Converting an address in one cell into multiple cells

    Quote Originally Posted by ThirtyTwo View Post
    It would help us if you can tell us what elements of the string will be constant, and which are variable

    For example - It will always end in 10 char zip code
    prior to zip code will always be 2 char state code
    city - is variable, either one or two words (separated with a " ")
    address - is variable, either one, two or three words (separated with a " ")
    name - is always two words, never one or more than three
    Exactly the way you described it Thirty Two, thanks for your reply. Firstname lastname and spacing is constant, address is variable, but will always end in " Ave " or " Dr " or " Blvd " etc...city name is variable, but will always follow the end of the address and will be followed with a "," and the state and zip are constant format. Zip will need to be reduced to the first 12345 before the "-" and after the " " following city.

    The bolded letters are variable in name length and the colored ones will match a short list for illustration

    Firstname Lastname 123 Paved Rd City, ST 12345-6789

  4. #4
    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: Converting an address in one cell into multiple cells

    Hi,

    See attached.

    I've used helper columns G:I rather than incorporate those helper formulae in with the B:D formulae which you could do but they's be harder to read. I've added a list of Dr Ave & St in K2:K4 to which you'll need to add others as they crop up.
    Attached Files Attached Files
    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.

  5. #5
    Registered User
    Join Date
    03-11-2014
    Location
    Roseville California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Converting an address in one cell into multiple cells

    Richard Buttrey, you are a god among mortals. Thank you so much!
    Now a stupid question: I tried to add some new street types to K (Ln, Ct, etc) and the address portion is coming up #VALUE! for those addresses. Do I need to modify anything in the helper columns?

  6. #6
    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: Converting an address in one cell into multiple cells

    Hi,

    Yes you'll need to modify column H, which is currenty only set to K2:K4.

    Better still create a dynamic range name, say 'rType' and define that as
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    then H2 etc becomes

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    One important point I forgot to stress is that whether you use $K2:$K... or the dynamic range name, column H cells must be array formulae, i.e entered with Ctrl-Shift-Enter

  7. #7
    Registered User
    Join Date
    03-11-2014
    Location
    Roseville California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Converting an address in one cell into multiple cells

    So for the most part, these formulas work. But I have run into some issues where they don't and I cant for the life of me determine why not...
    attached is a list of addresses and within them are the ones that appear as if they should be working(but are returning #Value!

    Thanks again!
    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. Split an Address in one cell into multiple cells using a formula
    By excelnovice2007 in forum Excel General
    Replies: 8
    Last Post: 01-22-2015, 10:49 AM
  2. sumif with multiple cells address
    By serouja in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-16-2012, 01:58 AM
  3. 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
  4. converting cell contents to a range address in VBA
    By Jggrnt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-29-2011, 03:22 PM
  5. [SOLVED] how to split address blocks across multiple cells
    By JoannaF in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-02-2006, 07:25 AM

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