Dim metin As String Dim adet As Integer Dim veriadet As Integer veriadet = WorksheetFunction.CountA(Sheets("Sheet1").Range("A:A")) Dim yazveriadet As Double Dim kolonno As Integer Dim satirno As Integer For i = 1 To veriadet metin = Sheets("Sheet1").Cells(i, 1).Value adet = Sheets("Sheet1").Cells(i, 4).Value
For k = 1 To adet yazveriadet = WorksheetFunction.CountA(Sheets("Sheet1").Range("H:J")) kolonno = Right(yazveriadet / 3 * 100, 2) If kolonno = 0 Then 'MsgBox "1. Kolon" satirno = Format(yazveriadet / 3, "##") + 1 Sheets("Sheet1").Cells(satirno, 8).Value = metin & "-0" & k ElseIf kolonno > 0 And kolonno < 35 Then 'MsgBox "2. Kolon satirno = Format(yazveriadet / 3, "##") + 1 Sheets("Sheet1").Cells(satirno, 9).Value = metin & "-0" & k ElseIf kolonno > 35 And kolonno < 70 Then 'MsgBox "3. Kolon" satirno = Format(yazveriadet / 3, "##") Sheets("Sheet1").Cells(satirno, 10).Value = metin & "-0" & k End If
Ellerinize sağlık mükemmel olmuş teşekkürler
Faydalı olduğuna çok sevindim arkadaşım.
Teşekkür ederim
Beğendiğine sevindim arkadaşım :)
Dim metin As String
Dim adet As Integer
Dim veriadet As Integer
veriadet = WorksheetFunction.CountA(Sheets("Sheet1").Range("A:A"))
Dim yazveriadet As Double
Dim kolonno As Integer
Dim satirno As Integer
For i = 1 To veriadet
metin = Sheets("Sheet1").Cells(i, 1).Value
adet = Sheets("Sheet1").Cells(i, 4).Value
For k = 1 To adet
yazveriadet = WorksheetFunction.CountA(Sheets("Sheet1").Range("H:J"))
kolonno = Right(yazveriadet / 3 * 100, 2)
If kolonno = 0 Then
'MsgBox "1. Kolon"
satirno = Format(yazveriadet / 3, "##") + 1
Sheets("Sheet1").Cells(satirno, 8).Value = metin & "-0" & k
ElseIf kolonno > 0 And kolonno < 35 Then
'MsgBox "2. Kolon
satirno = Format(yazveriadet / 3, "##") + 1
Sheets("Sheet1").Cells(satirno, 9).Value = metin & "-0" & k
ElseIf kolonno > 35 And kolonno < 70 Then
'MsgBox "3. Kolon"
satirno = Format(yazveriadet / 3, "##")
Sheets("Sheet1").Cells(satirno, 10).Value = metin & "-0" & k
End If
Next k
Next i