Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Mar 2001
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    retain cell width when copying cells

    Is there a way to copy a range of cells to a different spreadsheet, and keep the cell widths? I try Copy/Paste Special, but unless I copy the entire column, the cell width is lost.

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

    Re: retain cell width when copying cells

    The only way that Excel will paste the cell width is if you are pasting the full column. To just transfer the width from one column to another you would need a macro. The following VBA Procedure will set Column A to the same width as Column B.

    <pre>Public Sub TransferWidth()
    Columns("A").ColumnWidth = Columns("B").ColumnWidth
    End Sub
    </pre>

    Legare Coleman

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: retain cell width when copying cells

    It can be done, in XL2000, in a two stage process.

    Once you make the initial paste (normal paste or Paste special), and the destination cells are still highlighted, Select Paste Special and click on Coumn Widths.

    Unfortunately that option is not available in XL97, but instead of pasting special at that stage you could select Format, Columns, AutoFit selection. At least the columns should now accommodate the data.


    Andrew C

  4. #4
    Lounger
    Join Date
    Mar 2001
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: retain cell width when copying cells

    Thanks for the help. The 2 stage did exactly what we were looking for. Sorry it took me so long to respond.

Posting Permissions

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