Merge Cells from active row down

Shadkng

Active Member
Joined
Oct 11, 2018
Messages
365
Hi, I need some help merging an area. I would like to merge from the active cell col A to Col H, but also down 10 rows. I need a section where I can drop in some text. Below is what I have. Thanks

VBA Code:
Sub test()
Range("A" & Rows.Count).End(xlUp).EntireRow.Select
ActiveCell.Offset(2).Select

Range(Cells(ActiveCell.Row, "A"), Cells(ActiveCell.Row, "H")).MergeCells = True

End Sub
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Try:
VBA Code:
Sub Shadkng()
ActiveCell.Resize(10, 8).MergeCells = True
End Sub
 
Upvote 0
Would be ?

VBA Code:
Sub test()

Range(Cells(ActiveCell.Row, "A"), Cells(ActiveCell.Row, "H")).Resize(10).Merge

End Sub
 
Upvote 0
Would be ?

VBA Code:
Sub test()

Range(Cells(ActiveCell.Row, "A"), Cells(ActiveCell.Row, "H")).Resize(10).Merge

End Sub
OK, thanks. I added some code to copy some data from another sheet. However instead of Range("A56:H65").Select, can we paste into the resize section whereever that will be? Because that range will change all the time. Thanks

VBA Code:
Sub test()
Range("A" & Rows.Count).End(xlUp).EntireRow.Select
ActiveCell.Offset(2).Select

Range(Cells(ActiveCell.Row, "A"), Cells(ActiveCell.Row, "H")).Resize(10).Merge

Sheets("terms").Select
    Range("A1:H10").Select
    Selection.Copy
    Sheets("DETAIL FORM").Select
    Range("A56:H65").Select
    ActiveSheet.Paste

End Sub
[I]
[/I]
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

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
Back
Top