- Katılım
- 1 Aralık 2014
- Mesajlar
- 81
- Excel Vers. ve Dili
- ingilizce
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub KOD()
For a = 1 To Range("A65500").End(3).Row
If Cells(a, "B") > 0 Then
Do
x = x + 1
Cells(x, "E") = Cells(a, "A")
say = say + 1
Loop While say < Cells(a, "B")
say = 0
End If
Next
End Sub
Sub KOD()
Application.ScreenUpdating = False
Range("E:E").ClearContents
If Range("E1") = "" Then
sonsat = "1"
Else
sonsat = Cells(Rows.Count, "E").End(3).Row + 1
End If
For i = 1 To Cells(Rows.Count, "A").End(3).Row
If Cells(i, "B") > 0 Then
If Cells(i, "B") = 1 Then
s = 0
Else
s = Cells(i, "B") - 1
End If
Range("E" & sonsat & ":E" & sonsat + s) = Cells(i, "A")
sonsat = Cells(Rows.Count, "E").End(3).Row + 1
End If
Next i
Application.ScreenUpdating = True
MsgBox "B i t t i "
End Sub
. . .Mucit bey ve hüseyin bey ilginiz için teşekkür ederim.
Her iki kod da çalışıyor.Fakat çalıştırınca farkettim sıfırları göstermiyor ok ama benim için bir yazanlarıda göstermemesi ve mesela 2 yazıyorsa bir eksiği yani bir satır yazması 3 yazıyorsa 2 satır yazması gerektiğini anladım.
Hüseyin bey hangi satırlarda değişiklik yapmak gerekiyor bilgi verebilirseniz sevinirim
Sub KOD()
Application.ScreenUpdating = False
Range("E:E").ClearContents
If Range("E1") = "" Then
sonsat = "1"
Else
sonsat = Cells(Rows.Count, "E").End(3).Row + 1
End If
For i = 1 To Cells(Rows.Count, "A").End(3).Row
If Cells(i, "B") [COLOR="blue"][B]> 1[/B][/COLOR] Then
If Cells(i, "B") = 1 Then
s = 0
Else
s = Cells(i, "B") [B][COLOR="Blue"]- 2[/COLOR][/B]
End If
Range("E" & sonsat & ":E" & sonsat + s) = Cells(i, "A")
sonsat = Cells(Rows.Count, "E").End(3).Row + 1
End If
Next i
Application.ScreenUpdating = True
MsgBox "B i t t i "
End Sub