
只限于 AB列Sub 指定区域的数据合并()Dim rng As RangeSet rng = Application.InputBox("请选择需要处理的区域", "提示选择", , , , , , 8)x = rng.Rowy = rng.Columnxrow = rng.Rows.Countxcolumn = rng.Columns.CountFor n = 1 To xrowRange(Cells(x + n - 1, "A"), Cells(x + n - 1, "b")).SelectSelection.MergeNextEnd Sub