特別な処理は行っていません。

セルを一括結合(縦方向)するVBA

Option Explicit Sub Cells_BulkJoinVertical_Click() '宣言 Dim rowStart As Long Dim rowEnd As Long Dim rowMax As Long '初期設定 rowStart = Range("B2").End(xlDown).row rowEnd = Range("B2").End(xlDown).row With ActiveSheet.UsedRange '最後の行 rowMax = .Rows(.Rows.Count).row End With Do While rowEnd < rowMax '初期化 rowStart = rowEnd rowEnd = Cells(rowStart, 2).End(xlDown).row Range(Cells(rowStart, 2), Cells(rowEnd - 1, 2)).Select If rowEnd > rowMax Then Range(Cells(rowStart, 2), Cells(rowMax, 2)).Select End If With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlCenter .WrapText = False .Orientation = xlVertical .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = True End With Loop End Sub