+ Reply to Thread
Results 1 to 5 of 5

Parsing address information using VBA

  1. #1
    Registered User
    Join Date
    07-20-2011
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Parsing address information using VBA

    Alright, so I'm working on Excel at the moment, and want too create a macro button which involves some experience in VB6/Excel I'm not the best at it. What I'm trying to do is basically this. I have a list of customers Names, Address, City, State Zip all in one line going sideways. So what I'm trying to do is this. Instead of all them being sideways It is kind of messy for me. What i want is the following. Create a button that automatically does this. I'm going too create Name: Put all names going downwards, Address all addresses going downwards, City all cities going downwards etc.... So what i basically want this button to do is take the names from the straightened line that contains all the customers information and paste it neatly all under the Name: Address: City: State: Zip: by just a click of a button.

    As you can see above if you open it in excel you'll see the name, address and all straitened and i want too put it in the empty fields i made in Name: Address: City: State: in just a button I'd love you if you can do this thanks a lot!
    Attached Files Attached Files
    Last edited by Leith Ross; 07-20-2011 at 11:13 PM. Reason: Copied file to forum server

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    re: Parsing address information using VBA

    Hello JasonCohn,

    Welcome to the Forum!

    I copied your file to the local server. People are less likely to view a file posted on a public site.

    After looking at the format of the shipping details, I am not sure how this can be done. The data looks like is all separated by one or spaces which makes it almost impossible to parse. Is this data entered by hand?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-20-2011
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Parsing address information using VBA

    Quote Originally Posted by Leith Ross View Post
    Hello JasonCohn,

    Welcome to the Forum!

    I copied your file to the local server. People are less likely to view a file posted on a public site.

    After looking at the format of the shipping details, I am not sure how this can be done. The data looks like is all separated by one or spaces which makes it almost impossible to parse. Is this data entered by hand?
    No it isn't by hand, i sell on a website and when i download the file it looks like that, and i'd like too put it in nicely as i put in Name: Address: etc... So it recognizes for example first 16 spaces put in "Name:" then like 30 spaces for "Address:" or something like that. By the way are you on AIM i tried adding you

  4. #4
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Parsing address information using VBA

    JasonCohn,

    Welcome to the Excel Forum.

    Detach/open workbook JasonCohn - EF785066 - SDG12.xls and run macro ReorgData.
    Attached Files Attached Files
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Parsing address information using VBA

    Hello JasonCohn,

    I am not logged into my AOL account so you can't reach me by AIM. Generally, the forum discourages private communication unless it relates to discussion of confidential data. You can send me a private message.

+ 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