DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Yaz()
Dim i As Long, _
j As Integer
Application.ScreenUpdating = False
For i = 1 To Cells(Rows.Count, "A").End(3).Row
j = 2 + Cells(i, "B")
Range(Cells(i, "C"), Cells(i, j)) = Cells(i, "A")
Next i
Application.ScreenUpdating = True
MsgBox "Bitti...."
End Sub
Merhaba,
Aşağıdaki kodları bir modüle kopyalayıp dener misiniz?
Kod:Sub Yaz() Dim i As Long, _ j As Integer Application.ScreenUpdating = False For i = 1 To Cells(Rows.Count, "A").End(3).Row j = 2 + Cells(i, "B") Range(Cells(i, "C"), Cells(i, j)) = Cells(i, "A") Next i Application.ScreenUpdating = True MsgBox "Bitti...." End Sub
Sub Yaz()
Dim i As Long, _
j As Integer
Application.ScreenUpdating = False
For i = 5 To Cells(Rows.Count, "A").End(3).Row
j = 6 + Cells(i, "F")
Range(Cells(i, "G"), Cells(i, j)) = Cells(i, "E")
Next i
Application.ScreenUpdating = True
MsgBox "Bitti...."
End Sub
Merhaba,
Boş durma boşa çalış. Neden örnek dosyanız asıl dosyanızın yapısında olmaz anlamıyorum. Gereksiz yere emek harcatıyorsunuz.
Kod:Sub Yaz() Dim i As Long, _ j As Integer Application.ScreenUpdating = False For i = 5 To Cells(Rows.Count, "A").End(3).Row j = 6 + Cells(i, "F") Range(Cells(i, "G"), Cells(i, j)) = Cells(i, "E") Next i Application.ScreenUpdating = True MsgBox "Bitti...." End Sub
Eyvallah teşükkür ederim. :tongue:
Sub Yaz()
Dim i As Long, _
j As Long, _
Kol As Integer, _
Hcr As Range
Application.ScreenUpdating = False
For i = 5 To Cells(Rows.Count, "A").End(3).Row
j = 6 + Cells(i, "F")
Range(Cells(i, "G"), Cells(i, j)) = Cells(i, "E")
Next i
i = i - 1
Kol = Cells.Find("*", , , , xlByColumns, xlPrevious).Column
MsgBox Kol
j = 1
Sheets("Sayfa2").Range("A:A").ClearContents
Sheets("Sayfa2").Range("A1") = "Değerler"
For Each Hcr In Range(Cells(5, "G"), Cells(i, Kol))
If Not Hcr = "" Then
j = j + 1
Sheets("Sayfa2").Cells(j, "A") = Hcr
End If
Next Hcr
Sheets("Sayfa2").Range("A2:A" & j).Sort Key1:=Sheets("Sayfa2").Range("A1")
Sheets("Sayfa2").Select
Application.ScreenUpdating = True
MsgBox "Bitti...."
End Sub
Merhaba,
Kodlara ek yaptım, deneyiniz.
Kod:Sub Yaz() Dim i As Long, _ j As Long, _ Kol As Integer, _ Hcr As Range Application.ScreenUpdating = False For i = 5 To Cells(Rows.Count, "A").End(3).Row j = 6 + Cells(i, "F") Range(Cells(i, "G"), Cells(i, j)) = Cells(i, "E") Next i i = i - 1 Kol = Cells.Find("*", , , , xlByColumns, xlPrevious).Column MsgBox Kol j = 1 Sheets("Sayfa2").Range("A:A").ClearContents Sheets("Sayfa2").Range("A1") = "Değerler" For Each Hcr In Range(Cells(5, "G"), Cells(i, Kol)) If Not Hcr = "" Then j = j + 1 Sheets("Sayfa2").Cells(j, "A") = Hcr End If Next Hcr Sheets("Sayfa2").Range("A2:A" & j).Sort Key1:=Sheets("Sayfa2").Range("A1") Sheets("Sayfa2").Select Application.ScreenUpdating = True MsgBox "Bitti...." End Sub