Merhaba;
Aşağıdaki kodlar ile A sütununa yazdığım verilere göre gruplama yapabiliyorum.
Bunu c sütununa yazdığım verilere göre nasıl düzeltebilirim?
Sub Ayir()
Range("A2
58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Aşağıdaki kodlar ile A sütununa yazdığım verilere göre gruplama yapabiliyorum.
Bunu c sütununa yazdığım verilere göre nasıl düzeltebilirim?
Sub Ayir()
Range("A2
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub