Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Merged Cells (2000)

    I have an Impromptu report that I save as Excel.
    The problem with this report is that the Report heading is below the column headings.
    (I had to fudge Impromptu to get the heading because usually the heading is dropped off)
    When I bring it into Excel, the report heading is smooshed into the first column.
    I manually merge the cells to spread the Report heading across all columns
    (If the heading takes up 3 rows then I have to merge each row separately).
    Then I have to move the Report heading to the top of the report before the column headings.
    Is there a simple macro where I could highlight the smooshed rows in the first column and the cells could merge and once merged, move it to the top of the report? The reason I hope this can be automated, is because I have 52 reports that need this done.
    Thanks for any help you can provide.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merged Cells (2000)

    Could you attach a demo, with dummy data, of what an imported report looks like?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merged Cells (2000)

    This is what it looks like after I merge the rows and before I copy the rows to the top of report. The actual reports have varied amounts of columns - way more than just 4 like the example.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merged Cells (2000)

    Something like this? Select the cells that will become the header - in your demo cells A23 - and run the following macro:

    Sub FixHeader()
    Dim r As Range
    For Each r In Selection.Rows
    r.MergeCells = True
    Next r
    Selection.Cut
    Selection.Offset(-1, 0).Insert Shift:=xlDown
    End Sub

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merged Cells (2000)

    Thank you Hans. It worked perfectly as usual.

  6. #6
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Missouri, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merged Cells (2000)

    Thanks, Hans.

    My view on merged cells is that they should be avoided whenever possible. My alternative is to use "Center Across Selection" which effectively does the same, without the negatives of a merged cell (for further use of Excel capabilities).

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merged Cells (2000)

    I didn't bother pointing that out here, but I agree completely.

Posting Permissions

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