maaf lagi...
tolong makronya diperingkas (truktur IF THEN ELSE) nya
masih membuang-buang waktu
*perbaikan:*
Sub CellMerge()
' siti Vi / 19 Juli 2011 /Be Excel case/message/11991
'----------------------------------------------------
Dim Rng As Range, MrgAddr As String, r As Long
Set Rng = Selection
MrgAdrs = Rng(1, 1).Address(0, 0) & ":"
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For r = 1 To Rng.Rows.Count ' loop ke Kolom Tgl
If Not Int(Rng(r, 1).Value) = Int(Rng(r + 1, 1).Value) Then
MrgAdrs = MrgAdrs & Rng(r, 1).Address(0, 0)
* With Range(MrgAdrs)*
* .MergeCells = True*
* .HorizontalAlignment = xlCenter*
* .VerticalAlignment = xlCenter*
* End With*
MrgAdrs = Rng(r + 1, 1).Address(0, 0) & ":"
End If
Next r
Application.DisplayAlerts = False
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
~ siti
2011/7/19 STDEV(i) <[email protected]>
> maaf, ada kurang sedikit "quote for this day":
>
> menggabung cells (menjadi merged cells) dlm tabel yg sudah berkaidah
> database
> adalah *sangat tidak dianjurkan*, karena menurunkan / merusak tatanan yg
> sudah ada,
> memutus relasional antar data, menyulitkan pengolahan lebih lanjut.
> *kecuwalik: *
> memang anda mencari kesulitan di kemudian hari
> hanya diberlakukan kepada *copy *tabel yg akan dianggap sbg report
> (yg hanya akan dipandangi keindahannya)
>
>
> ~ siti
>
>