Paste row height.

Jonno

New Member
Joined
Oct 29, 2002
Messages
47
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 :cry:

Thanks,

Jonno.
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

jimboy

Well-known Member
Joined
Apr 11, 2002
Messages
2,314
How about selecting the whole row (keyboard shortcut Shift & Spacebar) - copying and PasteSpecial>Formats
 

Jonno

New Member
Joined
Oct 29, 2002
Messages
47
Thanks Jimboy. That takes all the formats with it though, I'm purely after just the row height.

Cheers,

Jonno.
 

jimboy

Well-known Member
Joined
Apr 11, 2002
Messages
2,314
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...
 

Jonno

New Member
Joined
Oct 29, 2002
Messages
47

ADVERTISEMENT

Can anyone assist with a VBA solution? :rolleyes:

Thanks,

Jonno.
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,224
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?
 

Jonno

New Member
Joined
Oct 29, 2002
Messages
47

ADVERTISEMENT

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.
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,224
Did you try my code? It does what you say you want to do without the need for selecting anything.
 

jimboy

Well-known Member
Joined
Apr 11, 2002
Messages
2,314
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
 

Jonno

New Member
Joined
Oct 29, 2002
Messages
47
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. :)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,310
Members
414,052
Latest member
Dual Showman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top