返回列表 上一主題 發帖

《請教》vba 合併儲存格

回復 1# eric093
  1. Sub bb()
  2.     k = Range("A65536").End(xlUp).Row
  3.     Application.DisplayAlerts = False
  4.     For j = 1 To k
  5.         If Cells(j, 1).Value <> A Then
  6.             A = Cells(j, 1).Value
  7.             d = Cells(j, 1).Address
  8.         Else
  9.             Range(d & ":" & Cells(j, 1).Address).Merge
  10.         End If
  11.     Next
  12.     Application.DisplayAlerts = True
  13. End Sub
複製代碼

TOP

        靜思自在 : 虛空有盡.我願無窮,發願容易行願難。
返回列表 上一主題