Sub 批量合并居中相同单元格()Dim l%, i%Application.DisplayAlerts = Falsek% = InputBox("请输入合并单元格所在列") l = [A65536].End(xlUp).RowFor i = l To 2 Step -1If Cells(i, k) = Cells(i - 1, k) ThenRange(Cells(i - 1, k), Cells(i, k)).MergeEnd IfNextApplication.DisplayAlerts = TrueEnd Sub
如果觉得《Excel之VBA实现一键批量合并某列相同单元格》对你有帮助,请点赞、收藏,并留下你的观点哦!