Veri kopyalama makro yardım

Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
Merhaba,

Aşağıdaki kodları forumdan bulup kendime göre derledim.

Fakat, ekli dosyada da görüleceği üzere ölçü başlıkları en son satırda çıkıyor.
Ben ise üçüncü satırda sabit ve başlık olarak kalmasını istiyorum.
Tüm denemelerime rağmen bir türlü beceremedim.

Yardımlarınız için şimdiden teşekkürler.


Kod:
Dim sat As String
Private Sub CommandButton1_Click()
Set Klasor = CreateObject("shell.application").BrowseForFolder(0, "Kaynak Dosyaları İçeren Klasörü Seçin", 50, &H0)
If Not Klasor Is Nothing Then
Kaynak = Klasor.SELF.Path
If InStr(1, Kaynak, "{") > 0 Then GoTo Atla
[A2:I65000] = ""
sat = 4
Liste (Kaynak)
Set Klasor = Nothing
MsgBox "işlem tamam"
Else
Atla:
MsgBox "Lütfen Kaynak Klasör Seçimini Yapınız !", vbInformation, "DİKKAT"
End If
End Sub
Private Sub Liste(yol As String)
Dim fL As Object, fs As Object, f As Object, j As Long, n As Long
Set fL = CreateObject("Scripting.FileSystemObject").GetFolder(yol).subfolders
Set fs = CreateObject("Scripting.FileSystemObject").GetFolder(yol).Files
If Right(yol, 1) <> "\" Then ekle = "\"
On Error Resume Next
For Each Dosya In fs
Application.DisplayAlerts = False
If ThisWorkbook.Name <> Dosya Then
sayfaadi = "Form3"
deg = "'" & yol & ekle & "[" & Dosya.Name & "]" & sayfaadi & "'!R"
If ExecuteExcel4Macro(deg & 3 & "C" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(sat, "a") = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(sat, "G") = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "F") = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "E") = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "D") = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "C") = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "B") = ExecuteExcel4Macro(deg & 8 & "C" & 5)
sat = Cells(Rows.Count, "b").End(3).Row + 1


If ExecuteExcel4Macro(deg & 3 & "C" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(sat, "G") = ExecuteExcel4Macro(deg & 13 & "C" & 2)
Worksheets(ActiveSheet.Name).Cells(sat, "F") = ExecuteExcel4Macro(deg & 12 & "C" & 2)
Worksheets(ActiveSheet.Name).Cells(sat, "E") = ExecuteExcel4Macro(deg & 11 & "C" & 2)
Worksheets(ActiveSheet.Name).Cells(sat, "D") = ExecuteExcel4Macro(deg & 10 & "C" & 2)
Worksheets(ActiveSheet.Name).Cells(sat, "C") = ExecuteExcel4Macro(deg & 9 & "C" & 2)
Worksheets(ActiveSheet.Name).Cells(sat, "B") = ExecuteExcel4Macro(deg & 8 & "C" & 2)

End If

End If
End If






Next
On Error GoTo sonraki
For Each f In fL
Liste (f.Path)
sonraki:
Next
Set fL = Nothing
End Sub
 

Ekli dosyalar

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,252
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Merhaba,

[A2:I65000] = "" bu kod satırı excel sayfasında 2. satırdan itibaren eski verileri temizliyor. 2 değerini 4 olarak düzeltip deneyiniz.
 
Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
Teşekkürler Korhan Bey.

İzninizle bir soru daha soracağım.

Aşağıdaki kod satırlarında bulunan ölçüm verilerini ekte verdiğim dosyaya x2 olarak almam mümkün mü?




Kod:
Worksheets(ActiveSheet.Name).Cells(sat, "G") = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "E") = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(sat, "C") = ExecuteExcel4Macro(deg & 9 & "C" & 5)
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,252
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Deneyiniz.

Rich (BB code):
Worksheets(ActiveSheet.Name).Cells(sat, "G") = ExecuteExcel4Macro(deg & 13 & "C" & 5) * 2
 
Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
Teşekkürler Korhan Bey, var olun.
 
Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
@Korhan Ayhan Bey son bir sorum daha olacak

Yukarıdaki kodlar, parca numaralarını dikey olarak, ölçüm sonuçlarını da yatay olarak getirmektedir.
Tam tersi uygulama için bu kodları kullanabilir miyim?
Kullanabilirsem değişiklik konusunda yardımcı olabilir misiz?
İyi çalışmalar.
 

Ekli dosyalar

Son düzenleme:
Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
Aşağıdaki kodu denedim ama istediğim olmadı.

Kod:
If ExecuteExcel4Macro(deg & 3 & "C" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(sat, "h") = ExecuteExcel4Macro(deg & 8 & "C" & 5)

Worksheets(ActiveSheet.Name).Cells(sat, "h") = ExecuteExcel4Macro(deg & 9 & "C" & 5) * 2

Worksheets(ActiveSheet.Name).Cells(sat, "h") = ExecuteExcel4Macro(deg & 10 & "C" & 5)

Worksheets(ActiveSheet.Name).Cells(sat, "h") = ExecuteExcel4Macro(deg & 11 & "C" & 5) * 2

Worksheets(ActiveSheet.Name).Cells(sat, "h") = ExecuteExcel4Macro(deg & 12 & "C" & 5)

Worksheets(ActiveSheet.Name).Cells(sat, "h") = ExecuteExcel4Macro(deg & 13 & "C" & 5) * 2
sat = Cells(Rows.Count, "ı").End(3).Row + 1
End If

If ExecuteExcel4Macro(deg & 3 & "C" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(sat, "ı") = ExecuteExcel4Macro(deg & 8 & "C" & 5)

Worksheets(ActiveSheet.Name).Cells(sat, "ı") = ExecuteExcel4Macro(deg & 9 & "C" & 5) * 2

Worksheets(ActiveSheet.Name).Cells(sat, "ı") = ExecuteExcel4Macro(deg & 10 & "C" & 5)

Worksheets(ActiveSheet.Name).Cells(sat, "ı") = ExecuteExcel4Macro(deg & 11 & "C" & 5) * 2

Worksheets(ActiveSheet.Name).Cells(sat, "ı") = ExecuteExcel4Macro(deg & 12 & "C" & 5)

Worksheets(ActiveSheet.Name).Cells(sat, "ı") = ExecuteExcel4Macro(deg & 13 & "C" & 5) * 2
sat = Cells(Rows.Count, "j").End(3).Row + 1
End If
 

Ekli dosyalar

Son düzenleme:
Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
Her sütun için ayrı ayrı yazarak aşağıdaki kodlarla verileri getirmeyi başardım. Fakat, kaynak klasörde onlarca excel dosyası olmasına rağmen, tüm sütunlara en son excel dosyasındaki verileri getiriyor.


Kod:
If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(12, 8) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 8) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 8) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 8) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 8) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 8) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 8) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 8) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 8) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 8) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 8) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 8) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 8) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 8) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 8) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 8) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,252
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Merhaba,

Aşağıdaki gibi yazmanızın özel bir nedeni var mı?

Worksheets(ActiveSheet.Name).Cells(12, 8)

Size tavsiyem tanımlamaları öğrenerek mümkün mertebe kodları kısaltmaya çalışmanız olacaktır. Aynı kodu aşağıdaki şekilde yazabilirsiniz.

ActiveSheet..Cells(12, 8)

Diğer yandan parantez içindeli satır sayısını sabit bıraktığınız için birden çok dosyadan veri almaya çalıştığınızda üst üste yazacağı için en son dosyadaki veri aktarılmış gibi olacaktır. Bu sebeple tavsiye ettiğim yöntemi öğrenerek bir sayaç tanımlayıp kırmızı bölümde onu kullanmayı denemelisiniz. Bu sayaç değerini her dosya için 1 arttırmalısınız. Bu şekilde verileri alt alta aktarabilirsiniz.
 
Katılım
8 Nisan 2013
Mesajlar
16
Excel Vers. ve Dili
Office 16 En
Office 365 En
64-bit
Altın Üyelik Bitiş Tarihi
01-03-2023
Korhan Bey Merhaba,

Herhangi bir nedeni yok. :) Benim makro ile ilişkim çok fazla olmadığı için benzer bir format bulup üzerinden uyarlamaya çalışıyorum.
Mantık yürüterek de kodların ne işe yaradığını deneyerek bulup öğrenmeye çalışıyorum. Çözemediğim anlarda da sizlerden destek almaya çalışıyorum.
Bir numaralı gönderide verdiğim örnekte de görüceğiniz üzere, oradaki kodu, bu dosyada da uyarlama çalıştım. :)

Worksheets(ActiveSheet.Name).Cells(sat, "H") kodu ile ilgili sütuna (H sütunu) getiremediğim verileri, Worksheets(ActiveSheet.Name).Cells(12, 8) kodu ile getirdim, ama bu seferde dediğiniz gibi oldu ve hep son dosyadaki veriler geldi.

Tüm sütunlara veri getirebilmek için de (arttırmamı söylediğiniz sayacın satır sayısı olduğunu düşünerek arttırarak) aşağıda yazdığım uzunca bir kod dizisi ortaya çıktı. Bu kadar uzun diziye gerek kalmadan çözülebilir bir durum olduğunu biliyorum ama bilmeyince malum. :)

Önerdiğiniz şekilde uygulayacağım. Bilgilendirmeniz için teşekkür ederim.


Kod:
If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 8) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 8) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 8) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 8) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 8) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 8) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 8) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 8) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 8) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 8) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 8) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 8) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 8) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 8) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 8) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 8) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 8) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If

If ExecuteExcel4Macro(deg & 4 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 9) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 9) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 9) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 9) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 9) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 9) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 9) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 9) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 9) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 9) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 9) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 9) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 9) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 9) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 9) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 9) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 9) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If


If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 10) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 10) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 10) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 10) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 10) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 10) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 10) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 10) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 10) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 10) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 10) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 10) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 10) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 10) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 10) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 10) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 10) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If

If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 11) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 11) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 11) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 11) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 11) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 11) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 11) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 11) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 11) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 11) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 11) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 11) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 11) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 11) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 11) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 11) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 11) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If

If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 12) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 12) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 12) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 12) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 12) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 12) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 12) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 12) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 12) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 12) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 12) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 12) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 12) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 12) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 12) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 12) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 12) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If

If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 13) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 13) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 13) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 13) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 13) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 13) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 13) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 13) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 13) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 13) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 13) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 13) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 13) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 13) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 13) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 13) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 13) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If

If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 14) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 14) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 14) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 14) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 14) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 14) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 14) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 14) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 14) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 14) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 14) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 14) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 14) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 14) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 14) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 14) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 14) = ExecuteExcel4Macro(deg & 23 & "C" & 5)
End If

If ExecuteExcel4Macro(deg & 3 & "c" & 3) <> "" Then
Worksheets(ActiveSheet.Name).Cells(11, 15) = Dosya.Name
Worksheets(ActiveSheet.Name).Cells(12, 15) = ExecuteExcel4Macro(deg & 8 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(13, 15) = ExecuteExcel4Macro(deg & 9 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(14, 15) = ExecuteExcel4Macro(deg & 10 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(15, 15) = ExecuteExcel4Macro(deg & 11 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(16, 15) = ExecuteExcel4Macro(deg & 12 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(17, 15) = ExecuteExcel4Macro(deg & 13 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(18, 15) = ExecuteExcel4Macro(deg & 14 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(19, 15) = ExecuteExcel4Macro(deg & 15 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(20, 15) = ExecuteExcel4Macro(deg & 16 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(21, 15) = ExecuteExcel4Macro(deg & 17 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(22, 15) = ExecuteExcel4Macro(deg & 18 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(23, 15) = ExecuteExcel4Macro(deg & 19 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(24, 15) = ExecuteExcel4Macro(deg & 20 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(25, 15) = ExecuteExcel4Macro(deg & 21 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(26, 15) = ExecuteExcel4Macro(deg & 22 & "C" & 5)
Worksheets(ActiveSheet.Name).Cells(27, 15) = ExecuteExcel4Macro(deg & 23 & "C" & 5)

End If
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,252
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Böyle uzun uzun yazmak yerşne belirttiğiniz gibi kısa çözümleri tercih etmelisiniz. Program yazmanın temeli olan döngüleri acilen araştırıp öğrenmenizi tavsiye ederim.
 
Üst