Excel Vba Code For Making 3 Seperate Lines?

I have an excel spreadsheet with company names, and their addresses.
Basically, in column A I have the business names listed and B has the street address C continues the street address, D contains the City name, E has the state, and F has the zip code.
I want to create labels so I want the information to be seen on 3 lines.
Ex: Company
Street address
state, city zipcode
I want the business name (A) to be on the first line and I want the first part of the address (B&C) to be on the next line and the rest to be on the 3rd line.
I have about 1000 of these and I’m not familiar with VBA so if someone here knowledgable on the subject could help me out I would appreciate it.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Author: admin on December 23, 2009
Category: Excel Macros , Formula & Other VBA Codes
Tags: , , , ,
2 responses to “Excel Vba Code For Making 3 Seperate Lines?”
  1. Yahoo Qs-Ans says:

    See if this helps you in any way without entering into VBA……
    Consider below example only for 1 records out of your 1000 records.
    1. First select the row horizontally from Col A to Col F.
    2. Right click -> Copy
    3. Maybe you can go to any other sheet (or wherever you want) ->
    Right Click -> ‘Paste Special’-> Tick the ‘Transpose’ option -> Click ‘OK’
    This was for 1 row…..similarly you can do the same by selecting all the 1000 records.
    (Note: Check if you are fine if both the Street Address B&C are on the diff. lines else you will have to concatenate B&C to form 1 single column. If you are not aware of CONCATENATE, pls refer help on this string function)
    Good Luck !

  2. AJ says:

    You don’t need VBA. Go into Word and do a mail merge. faster and easier than writing a loop.

Leave a Reply

Last articles