- Katılım
- 12 Şubat 2015
- Mesajlar
- 520
- Excel Vers. ve Dili
- Office 2016 TR 64 Bit Windows
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub cogalt()
Dim say As Long
For i = 1 To Cells(Rows.Count, 3).End(xlUp).Row
say = Cells(i, 3)
If say = emtpy Then GoTo 10
bas = 1
paket = "Paket "
metin = ""
Do
metin = metin & paket & bas & ","
bas = bas + 1
Loop Until bas = say + 1
Cells(i, 4) = metin
10
Next i
End Sub
deneyiniz.
Option Explicit
Sub Veri_Ekle()
Dim Veri As Variant, Son As Long, X As Long, Metin As String
Dim Y As Integer, Dizi As Object, Zaman As Double
Zaman = Timer
Set Dizi = CreateObject("Scripting.Dictionary")
Son = Cells(Rows.Count, 2).End(3).Row
If Son = 1 Then Son = 2
Veri = Range("B1:B" & Son).Value
Range("C:C").Clear
Metin = "Paket "
ReDim Liste(1 To UBound(Veri), 1 To 1)
For X = LBound(Veri) To UBound(Veri)
If IsNumeric(Veri(X, 1)) Then
For Y = 1 To Veri(X, 1)
Dizi.Add Metin & Y, Nothing
Next
Liste(X, 1) = Join(Dizi.Keys, ",") & ","
Dizi.RemoveAll
End If
Next
Range("C1").Resize(UBound(Veri)) = Liste
Set Dizi = Nothing
MsgBox "İşleminiz tamamlanmıştır." & Chr(10) & Chr(10) & _
"İşlem süresi ; " & Format(Timer - Zaman, "0.00") & " Saniye", vbInformation
End Sub
Makro kullanmayı biliyor musunuz?
Sub cogalt()
Dim say As Long
For i = 1 To Cells(Rows.Count, 2).End(xlUp).Row
say = Cells(i, 2)
If say = emtpy Then GoTo 10
bas = 1
paket = "Paket "
metin = ""
Do
metin = metin & paket & bas & ","
bas = bas + 1
Loop Until bas = say + 1
Cells(i, 3) = metin
10
Next i
End Sub