Sub Macro1()
Application.DisplayAlerts = False
For i = Range("j65535").End(xlUp).Row To 6 Step -1
test = Cells(i, 10)
For j = i To 6 Step -1
If Cells(j - 1, 10) <> test Then
Exit For
End If
Next j
Range(Cells(i, 10), Cells(j, 10)).Merge
Range(Cells(i, 11), Cells(j, 11)).Merge
Range(Cells(i, 12), Cells(j, 12)).Merge
Range(Cells(i, 13), Cells(j, 13)).Merge
Next i
[A1].Select
Application.DisplayAlerts = True
End Sub