Listing Code nya:
Sub MergeCellBersyuarat()
' coded by: siti Vi / Oct 26, 2011
' meMerge cell yg valuenya sama
' kiboar short-cut = Ctrl+Shift+M
'--------------------------------
Dim Blok As Range, X As Range, c As Integer
Set Blok = Selection: Set X = Selection(1, 1)
Application.DisplayAlerts = False
Do
c = WorksheetFunction.CountIf(Blok, X)
If c > 0 Then
X.Resize(1, c).Merge
Set X = X(1, c + 1): c = 0
If Len(X.Value) = 0 Then Exit Do
End If
Loop
Application.DisplayAlerts = True
End Sub
Menjalannya:
Blok-lah range yg akan diproses (misal: range E5:BD5)
lalu tekan tombol Ctrl + Shift + M
~siti
Nenhum comentário:
Postar um comentário