+ Reply to Thread
Results 1 to 12 of 12

Create mail labels from cell string

  1. #1
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73

    Create mail labels from cell string

    I have a column of data that contains addresses, imported from outlook. Each cell would contain a full address, but the data is in the form of a long string so the address would look as follows:

    1 This StreetThis TownThis CityPostcode

    Is there a way to extract the individual elements into a label?

    Thanks in advance for any assistance

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,420

    Re: Create mail labels from cell string

    Which version of Excel are you using?

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73

    Re: Create mail labels from cell string

    Hi,

    Its excel 2010 I'll be using. I've tried to upload some test data. Thers 5 cells of random data, each is a full UK address as a string in a cell but I'm trying to make address lables from it.
    Attached Files Attached Files

  4. #4
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Create mail labels from cell string

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    if string lenght not more 99 then row($a$1:index(a:a;len(a3))) could be replaced by row($a$1:$a$99) (see sheet1 (2) )

    Also prev. value could be used
    Please Login or Register  to view this content.
    ( see sheet1 (3) )

    There are array formulas here
    Attached Files Attached Files
    Last edited by BMV; 05-17-2020 at 01:37 AM.

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

    Re: Create mail labels from cell string

    Please try at
    B3
    =LEFT(A3,FIND(" ",A3)-1)

    C3:F3
    =MID(LEFT($A3,AGGREGATE(15,6,ROW($A$1:$A$98)/(CODE(MID($A3&"aA",ROW($A$1:$A$98),1))>95)/(ABS(CODE(MID($A3&"aA",ROW($A$2:$A$99),1))-78)<14),COLUMNS($C3:C3))),SUMPRODUCT(LEN($B3:B3))+3,99)
    Attached Files Attached Files

  6. #6
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Create mail labels from cell string

    Bo_Ry, It's good but i could destroy your formula. it is not real data but ...
    "29 Newgate StreetJack Hill GMontroseLS22 3RE"
    i mean it must be "Jack Hill G" and "Montrose"

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,420

    Re: Create mail labels from cell string

    @Tanktata

    Please update your forum profile to show the version of Excel that you are currently using (in the version field). Thanks.

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

    Re: Create mail labels from cell string

    For "29 Newgate StreetJack Hill GMontroseLS22 3RE"

    C2:E2
    =MID(TRIM(LEFT($A3,AGGREGATE(15,6,ROW($A$1:$A$99)/(MID($A3,ROW($A$1:$A$99),1)<>" ")/(ABS(CODE(MID($A3,ROW($A$2:$A$100),1))-78)<14),COLUMNS($C3:C3)))),SUMPRODUCT(LEN($B3:B3))+2,99)

    F2
    =MID(TRIM(A3),SUMPRODUCT(LEN($B3:E3))+3,99)
    Attached Files Attached Files

  9. #9
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Create mail labels from cell string

    Here's a macro to do the processing. Formatted results are output to column B:
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  10. #10
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73

    Re: Create mail labels from cell string

    Thank you all for the assistance. All the different methods provided work well.

    If there were a scenario where one of the items of data wasnt capitalised, would it be possible to still seperate the data or does each method essentially look for a capitalised letter?

  11. #11
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Create mail labels from cell string

    Quote Originally Posted by tanktata View Post
    If there were a scenario where one of the items of data wasnt capitalised,
    Try to du it manually. Haw you do it? You know name of street or town and it help you to split. Without it it is not possible i think.

  12. #12
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Create mail labels from cell string

    Quote Originally Posted by tanktata View Post
    If there were a scenario where one of the items of data wasnt capitalised, would it be possible to still seperate the data or does each method essentially look for a capitalised letter?
    If you had a list of all the postcodes and their associated localities to compare against, possibly, but not otherwise.

+ 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. Mail Merge from excel file for labels not populating labels
    By rcdavis28 in forum Word Formatting & General
    Replies: 1
    Last Post: 10-15-2016, 03:06 PM
  2. Attempting to automate mail labels
    By wwilder in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2015, 09:32 AM
  3. Preparing for Mail Merge (Labels)
    By twham in forum Excel General
    Replies: 2
    Last Post: 09-11-2012, 01:04 PM
  4. Replies: 8
    Last Post: 08-07-2012, 10:15 AM
  5. How to e-mail selected row and use e-mail address in a cell to send e-mail from excel
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2010, 02:15 AM
  6. [SOLVED] How to create duplicate labels with mail merge?
    By Beth in forum Excel General
    Replies: 3
    Last Post: 07-05-2006, 05:00 PM
  7. [SOLVED] In mail merging the labels have # on them that are not in documen
    By christie in forum Excel General
    Replies: 1
    Last Post: 09-13-2005, 06:05 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