Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy and Paste - INCLUDING COLUMN WIDTHS! (97 SR-2)

    I would like to know if there is a way to include the formatting of column widths when pasting data from one worksheet to another. The default copy and paste includes the formatting of the individual cells, but not the format of column widths. Is there a way to include this in the form of a custom macro?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy and Paste - INCLUDING COLUMN WIDTHS! (97 SR-2)

    If you copy and paste the entire column, the column width should be pasted along with everything else. If you don't copy the entire column, then the column width will not be pasted.
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy and Paste - INCLUDING COLUMN WIDTHS! (97 SR-2)

    Thanks for the tip!! I tried it and of course it does just what you said. I learned something else too. If I select, say, the first five columns of data and paste it into a new worksheet, the column widths update, but the row heights are not included. I then tried the converse. I selected 10 whole rows of data and pasted them into a new worksheet. Lo and behold, the row height updated as well, but not the column widths. Go figure. Too bad it could handle both by default, but at least I am most of the way to my goal.

    THANKS AGAIN!!

  4. #4
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy and Paste - INCLUDING COLUMN WIDTHS! (97 SR-2)

    If you select the entire sheet using the button in the corner, where the row-selectors and column-selectors meet, both the row heights and column widths will be preserved. However, any contents of the target sheet (the one you paste into) will be clobbered, because you selected the entire sheet for copy.

    This is more of a technical note than a practical solution.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Copy and Paste - INCLUDING COLUMN WIDTHS! (97 SR-2)

    On an equally impractical note, if you select the entire sheet, you can (in XL97) then copy only the formatting (I use the Format Painter button), including row and column sizes, and reproduce the formats on another sheet, without copying the data.
    -John ... I float in liquid gardens
    UTC -7ąDS

  6. #6
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy and Paste - INCLUDING COLUMN WIDTHS! (97 SR-2)

    Actually, that seems at least somewhat practical to me, since your data won't be clobbered.

Posting Permissions

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