Dede hocamın vermiş olduğu kaydet kodunda Sayfa1 deki 21 ile 30 satırdaki sütunları birleştirmeye yarıyor. Çalışmamda bir kaç değişiklik olduğundan ekte vermiş olduğum sarı renkli satırları da birleştirmek için kodda ne gibi değişiklik yapmak lazım. Bir kaç deneme yaptım ama istediğim sonucu alamadım.
T sütununa kayıt yaparken otomatik sayı verdiriyorum.
If Cells(Satır, 2).Value = Cells(Satır - 1, 2).Value Then
If Cells(Satır, 3).Value = Cells(Satır - 1, 3).Value Then
If Cells(Satır, 4).Value = Cells(Satır - 1, 4).Value Then
If Cells(Satır, 5).Value = Cells(Satır - 1, 5).Value Then
If Cells(Satır, 6).Value = Cells(Satır - 1, 6).Value Then
Application.DisplayAlerts = False
With Range("A" & Satır - 1 & ":t" & Satır)
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
For i = 21 To 30
With Range(Cells(Satır - 1, i), Cells(Satır, i))
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
Next
Application.DisplayAlerts = True
End If
End If
End If
End If
End If
T sütununa kayıt yaparken otomatik sayı verdiriyorum.
If Cells(Satır, 2).Value = Cells(Satır - 1, 2).Value Then
If Cells(Satır, 3).Value = Cells(Satır - 1, 3).Value Then
If Cells(Satır, 4).Value = Cells(Satır - 1, 4).Value Then
If Cells(Satır, 5).Value = Cells(Satır - 1, 5).Value Then
If Cells(Satır, 6).Value = Cells(Satır - 1, 6).Value Then
Application.DisplayAlerts = False
With Range("A" & Satır - 1 & ":t" & Satır)
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
For i = 21 To 30
With Range(Cells(Satır - 1, i), Cells(Satır, i))
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
Next
Application.DisplayAlerts = True
End If
End If
End If
End If
End If
