+ Reply to Thread
Results 1 to 9 of 9

converting rows and columns to merge data

  1. #1
    Registered User
    Join Date
    09-08-2008
    Location
    NJ
    Posts
    4

    converting rows and columns to merge data

    I need some help converting an exported address file so i can align the columns properly and perform a mail merge in Word.

    The problem iI am having is Excel has in Row A the following

    A
    1)company name
    2)address
    3)company name
    4)address
    5)company name
    6)address

    how do I get ever second line moved to a column so everything lines up and I have two columns of name and address. I have several thousand records to fix up and make a mail merge document for a letter

    thanks

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    In column B1 enter the formula =A2
    Highlight B1 and B2
    Double click on the fill box (the little black box on the lower right side of the cell) this will fill column B with the addresses.
    It should look like this
    Please Login or Register  to view this content.
    Highlight column B.
    Copy the column (Ctrl+C)
    Right click on column B header and choose Paste Special... Choose values
    Press F5, click on the Special button - choose Blanks
    Press Ctrl +"-" (minus) or right click one of the highlighted cells and choose Delete
    Choose entire row.

    It's easier than it sounds - I'll post a macro soon

  3. #3
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Here's the macro - assumes, like the formulas I posted that there is now header row.
    Please Login or Register  to view this content.
    If there is a header row (or rows) change the 1 in the i=1 line to the first row that has the company name.

  4. #4
    Registered User
    Join Date
    09-08-2008
    Location
    NJ
    Posts
    4
    THANK YOU VERY MUCH WORKED AWESOME!

    One last question how do i go back and delete every other row so i can have blank cells and shift up

    thanks

  5. #5
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    The macro will do this automatically and if you follow the instructions in my first post you will be deleting every other row.

    this section:
    Highlight column B.
    Copy the column (Ctrl+C)
    Right click on column B header and choose Paste Special... Choose values
    Press F5, click on the Special button - choose Blanks
    Press Ctrl +"-" (minus) or right click one of the highlighted cells and choose Delete
    Choose entire row.

  6. #6
    Registered User
    Join Date
    09-08-2008
    Location
    NJ
    Posts
    4
    I spoke to quick i meant in column a so the data lines up as i now have the data in b1 in a2

    thanks

  7. #7
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    I'm not sure I know what you mean.

    If your data looks like this:
    Please Login or Register  to view this content.
    please continue with the steps posted below the code box in my first post.

    If you have a header row, you'd have to but the formula in the first row where you want to move the address to an change the formula, For example, the first address is to go in B2, your formula there would be =A3.

  8. #8
    Registered User
    Join Date
    09-08-2008
    Location
    NJ
    Posts
    4
    From your example if i wanted to delete row 2,4,6 how would i do that since i have several thousand while keeping the new data 1,3,and 5

  9. #9
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    If you follow the direction in my first post to the end you will be deleting the alternating rows. It's after you Paste Special Values... Section

    The part in red explains how to delete the rows

    In column B1 enter the formula =A2
    Highlight B1 and B2
    Double click on the fill box (the little black box on the lower right side of the cell) this will fill column B with the addresses.

    (table removed from here)

    Highlight column B.
    Copy the column (Ctrl+C)
    Right click on column B header and choose Paste Special... Choose Values (click okay)
    Press F5, click on the Special button - choose Blanks
    Press Ctrl +"-" (minus) or right click one of the highlighted cells and choose Delete
    Choose entire row (click okay).


    If you want process automated, use the Macro.

+ 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. converting downloaded data from columns to rows
    By newdude in forum Excel General
    Replies: 7
    Last Post: 01-07-2009, 06:00 AM
  2. Convert Columns to rows with DATA
    By raed_237 in forum Excel General
    Replies: 6
    Last Post: 08-05-2008, 04:18 AM
  3. Various macro issues linked to DDE
    By JMann in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-16-2008, 08:08 AM
  4. function for Rows of data to Columns
    By vickinangle in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-06-2008, 05:41 PM
  5. Move Blocks Of Data In Columns To Rows
    By phillim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2008, 03:27 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