Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Paste row height.

This is a discussion on Paste row height. within the Excel Questions forums, part of the Question Forums category; Is it possible to paste purely a row height (no formats, values etc.) It's simple enough to paste a column ...

  1. #1
    New Member
    Join Date
    Oct 2002
    Posts
    47

    Default Paste row height.

    Is it possible to paste purely a row height (no formats, values etc.)

    It's simple enough to paste a column width using the Paste Special command, but what about rows - they seem a bit neglected

    Thanks,

    Jonno.

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    2,317

    Default Re: Paste row height.

    How about selecting the whole row (keyboard shortcut Shift & Spacebar) - copying and PasteSpecial>Formats

  3. #3
    New Member
    Join Date
    Oct 2002
    Posts
    47

    Default Re: Paste row height.

    Thanks Jimboy. That takes all the formats with it though, I'm purely after just the row height.

    Cheers,

    Jonno.

  4. #4
    Board Regular
    Join Date
    Apr 2002
    Posts
    2,317

    Default Re: Paste row height.

    I don't think there is a way, how about clearing the formats after you have pasted? (Edit>Clear>Formats) - this will clear your formats you had previously tho'.

    You could always do a macro...

  5. #5
    New Member
    Join Date
    Oct 2002
    Posts
    47

    Default Re: Paste row height.

    Can anyone assist with a VBA solution?

    Thanks,

    Jonno.

  6. #6
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,006

    Default Re: Paste row height.

    All you want is row height?

    Rows(5).RowHeight = Rows(1).RowHeight
    will make the height of row 5 be whatever the height of row 1 is.

    To do a few at once:
    Range("5:9").RowHeight = Rows(1).RowHeight

    Am I missing something or is there more to the question?

  7. #7
    New Member
    Join Date
    Oct 2002
    Posts
    47

    Default Re: Paste row height.

    Tom,

    I want to select a row and paste it's height to another row or rows without taking all the data and formats. Identical to 'paste column widths' in the Paste Special command but to suit row heights.

    Thanks,

    Jonno.

  8. #8
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,006

    Default Re: Paste row height.

    Did you try my code? It does what you say you want to do without the need for selecting anything.

  9. #9
    Board Regular
    Join Date
    Apr 2002
    Posts
    2,317

    Default Re: Paste row height.

    How about this, it will bring up a inputbox, enter the row you want to copy in i.e. 10

    Code:
    Sub Copy_Row_Height()
    On Error Resume Next
        Dim myrow As Variant
        
        myrow = InputBox("Which row height do you want to copy?")
        Rows(ActiveCell.Row).RowHeight = Rows(myrow).RowHeight
    End Sub

  10. #10
    New Member
    Join Date
    Oct 2002
    Posts
    47

    Default Re: Paste row height.

    Thanks Tom. Your code does do want I need regarding matching the row heights, but I'd like to be able to select the 'from' and 'to' rows.

    I'll end up having a 'Match Row' custom button assigned as I think this would be very useful.

    Thanks once more,

    Jonno.

Page 1 of 2 12 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com