Hi, can anyone please help me with a code where after last blank row, B to G is merged. Thanks
tries this but still no luck
.Range("B" & Range("G" & Rows.Count).End(xlUp).Offset(2, 0)).Select Selection.Merge
Hi, can anyone please help me with a code where after last blank row, B to G is merged. Thanks
tries this but still no luck
.Range("B" & Range("G" & Rows.Count).End(xlUp).Offset(2, 0)).Select Selection.Merge
Last edited by biznez; 08-13-2015 at 11:33 AM.
One way,
Sub test() Dim LR As Long With Columns("B:G") LR = .Find("*", , , , xlByRows, xlPrevious).Row 'last non-empty row within col. B to G .Rows(LR + 1).Merge 'merge cells on row LR+1 within these columns End With End Sub
Maybe:
Sub biznez() Dim x As Long, y As Long x = Cells(Rows.Count, "B").End(3)(2).row Range(Cells(x, "B"), Cells(x, "G")).Merge End Sub
Thanks guys, both worked great!
You're welcome, and thanks for the rep
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks