Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to delete and merge columns in a table

    Sometimes I try to write macros but do not have the expertise to create one that can do what I want. Thank God for this forum. I have been helped so many times I don't remember how many.

    I have tables with only 2 columns and 3 columns and 1 row (piece of cake). No problem creating the macro. It works beautifully.

    However, I have tables with 5 columns and 7 columns that I need to bring down to 2 columns.

    The reason I need to do this is because the information is separated into columns to demonstrate that the information is duplicated and then on the last column is only the information wanted, which will then be only two columns and 1 row.

    The macro would have to:

    1. Make sure that all the table properties is in inches because I see that some parts are in percent and some in inches (have no idea why).
    2. Delete columns 2, 4, 6. (If the table has 7 columns / columns 2, 4 if table has 5 columns).
    3. Merge columns 1, 2, 3. (If the table has 5 columns merge columns 1 & 2).
    4. Merge the last column into one cell.
    5. Delete the paragraph marks in that cell and replace it with a space (only here).
    6. The column widths would be: 1.45 and 7.36.
    7. No inside/right borders on column 2.
    8. No left border in column 1.
    9. No shading in column 2.
    10. Font: Times News Romans/18pt.

    I attached a document with a sample. Hope it makes sense.

    Thank you guys very much for taking the time to help others like myself. It teaches me to help others without expecting nothing in return. Again, whoever answer, thank you.

    Attached Files Attached Files

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Here's a start on it. Nos. 2-4.
    Attached Files Attached Files

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Homework completed

    And here is the rest, building on Jefferson's groundwork.
    Attached Files Attached Files
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts
    One million kudos. Thank you guys. This helps me a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •