• retain cell width when copying cells

    Author
    Topic
    #354010

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #519183

      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.

      Public Sub TransferWidth()
          Columns("A").ColumnWidth = Columns("B").ColumnWidth
      End Sub
      
    • #519335

      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

      • #521876

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

    Viewing 1 reply thread
    Reply To: retain cell width when copying cells

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: