- Katılım
- 8 Aralık 2011
- Mesajlar
- 964
- Excel Vers. ve Dili
- Excel 2016,32bit
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Merhaba Ömer bey,Merhaba
Soru 1
L sütunundakiler Tablo1 de 2 şer satıra sahip, I sütunundaki YANLIŞ olmayan ya da sayısal olan satırlardaki değerler mi gelecek?
Soru 2
Formülle sizin için daha kolay olmaz mı?
Merhaba,
Formülle (Topla.Çarpım) çözüm ektedir,
Merhaba sayın 1Al2Ver,Merhaba,
Formülle (Topla.Çarpım) çözüm ektedir,
Sub ozet()
Dim d As Object, i As Long, deg, son As Long, deg2 As Double
Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object
Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object
Set d = CreateObject("Scripting.Dictionary")
Set d1 = CreateObject("Scripting.Dictionary")
Set d2 = CreateObject("Scripting.Dictionary")
Set d3 = CreateObject("Scripting.Dictionary")
Set d4 = CreateObject("Scripting.Dictionary")
Set d5 = CreateObject("Scripting.Dictionary")
Set d6 = CreateObject("Scripting.Dictionary")
Set d7 = CreateObject("Scripting.Dictionary")
Set d8 = CreateObject("Scripting.Dictionary")
Set d9 = CreateObject("Scripting.Dictionary")
Set d10 = CreateObject("Scripting.Dictionary")
son = Cells(Rows.Count, "B").End(xlUp).Row
Application.ScreenUpdating = False
For i = 1 To son
deg = Cells(i, "B")
If Not d.exists(deg) Then
d.Add deg, Nothing
End If
If i < 3 Then GoTo Devam
If Cells(i, "I") <> False Then
deg2 = Cells(i, "I")
Select Case Cells(i, "C")
Case Cells(2, 13)
d1.Add deg2, Nothing
Case Cells(2, 14)
d2.Add deg2, Nothing
Case Cells(2, 15)
d3.Add deg2, Nothing
Case Cells(2, 16)
d4.Add deg2, Nothing
Case Cells(2, 17)
d5.Add deg2, Nothing
Case Cells(2, 18)
d6.Add deg2, Nothing
Case Cells(2, 19)
d7.Add deg2, Nothing
Case Cells(2, 20)
d8.Add deg2, Nothing
Case Cells(2, 21)
d9.Add deg2, Nothing
Case Cells(2, 22)
d10.Add deg2, Nothing
End Select
End If
Devam:
Next i
Range("L:L").ClearContents
xx = d1.Count
Range("L1").Resize(d.Count) = Application.Transpose(d.keys)
Range("M3").Resize(d1.Count) = Application.Transpose(d1.keys)
Range("N3").Resize(d2.Count) = Application.Transpose(d2.keys)
Range("O3").Resize(d3.Count) = Application.Transpose(d3.keys)
Range("P3").Resize(d4.Count) = Application.Transpose(d4.keys)
Range("Q3").Resize(d5.Count) = Application.Transpose(d5.keys)
Range("R3").Resize(d6.Count) = Application.Transpose(d6.keys)
Range("S3").Resize(d7.Count) = Application.Transpose(d7.keys)
Range("T3").Resize(d8.Count) = Application.Transpose(d8.keys)
Range("U3").Resize(d9.Count) = Application.Transpose(d9.keys)
Range("V3").Resize(d10.Count) = Application.Transpose(d10.keys)
End Sub
Merhaba Ömer bey,Mevcut kodlarınıza benzer şekilde ilaveler yaptım
C++:Sub ozet() Dim d As Object, i As Long, deg, son As Long, deg2 As Double Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object Set d = CreateObject("Scripting.Dictionary") Set d1 = CreateObject("Scripting.Dictionary") Set d2 = CreateObject("Scripting.Dictionary") Set d3 = CreateObject("Scripting.Dictionary") Set d4 = CreateObject("Scripting.Dictionary") Set d5 = CreateObject("Scripting.Dictionary") Set d6 = CreateObject("Scripting.Dictionary") Set d7 = CreateObject("Scripting.Dictionary") Set d8 = CreateObject("Scripting.Dictionary") Set d9 = CreateObject("Scripting.Dictionary") Set d10 = CreateObject("Scripting.Dictionary") son = Cells(Rows.Count, "B").End(xlUp).Row Application.ScreenUpdating = False For i = 1 To son deg = Cells(i, "B") If Not d.exists(deg) Then d.Add deg, Nothing End If If i < 3 Then GoTo Devam If Cells(i, "I") <> False Then deg2 = Cells(i, "I") Select Case Cells(i, "C") Case Cells(2, 13) d1.Add deg2, Nothing Case Cells(2, 14) d2.Add deg2, Nothing Case Cells(2, 15) d3.Add deg2, Nothing Case Cells(2, 16) d4.Add deg2, Nothing Case Cells(2, 17) d5.Add deg2, Nothing Case Cells(2, 18) d6.Add deg2, Nothing Case Cells(2, 19) d7.Add deg2, Nothing Case Cells(2, 20) d8.Add deg2, Nothing Case Cells(2, 21) d9.Add deg2, Nothing Case Cells(2, 22) d10.Add deg2, Nothing End Select End If Devam: Next i Range("L:L").ClearContents xx = d1.Count Range("L1").Resize(d.Count) = Application.Transpose(d.keys) Range("M3").Resize(d1.Count) = Application.Transpose(d1.keys) Range("N3").Resize(d2.Count) = Application.Transpose(d2.keys) Range("O3").Resize(d3.Count) = Application.Transpose(d3.keys) Range("P3").Resize(d4.Count) = Application.Transpose(d4.keys) Range("Q3").Resize(d5.Count) = Application.Transpose(d5.keys) Range("R3").Resize(d6.Count) = Application.Transpose(d6.keys) Range("S3").Resize(d7.Count) = Application.Transpose(d7.keys) Range("T3").Resize(d8.Count) = Application.Transpose(d8.keys) Range("U3").Resize(d9.Count) = Application.Transpose(d9.keys) Range("V3").Resize(d10.Count) = Application.Transpose(d10.keys) End Sub
Ömer bey tekrar merhabalar,Mevcut kodlarınıza benzer şekilde ilaveler yaptım
C++:Sub ozet() Dim d As Object, i As Long, deg, son As Long, deg2 As Double Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object Set d = CreateObject("Scripting.Dictionary") Set d1 = CreateObject("Scripting.Dictionary") Set d2 = CreateObject("Scripting.Dictionary") Set d3 = CreateObject("Scripting.Dictionary") Set d4 = CreateObject("Scripting.Dictionary") Set d5 = CreateObject("Scripting.Dictionary") Set d6 = CreateObject("Scripting.Dictionary") Set d7 = CreateObject("Scripting.Dictionary") Set d8 = CreateObject("Scripting.Dictionary") Set d9 = CreateObject("Scripting.Dictionary") Set d10 = CreateObject("Scripting.Dictionary") son = Cells(Rows.Count, "B").End(xlUp).Row Application.ScreenUpdating = False For i = 1 To son deg = Cells(i, "B") If Not d.exists(deg) Then d.Add deg, Nothing End If If i < 3 Then GoTo Devam If Cells(i, "I") <> False Then deg2 = Cells(i, "I") Select Case Cells(i, "C") Case Cells(2, 13) d1.Add deg2, Nothing Case Cells(2, 14) d2.Add deg2, Nothing Case Cells(2, 15) d3.Add deg2, Nothing Case Cells(2, 16) d4.Add deg2, Nothing Case Cells(2, 17) d5.Add deg2, Nothing Case Cells(2, 18) d6.Add deg2, Nothing Case Cells(2, 19) d7.Add deg2, Nothing Case Cells(2, 20) d8.Add deg2, Nothing Case Cells(2, 21) d9.Add deg2, Nothing Case Cells(2, 22) d10.Add deg2, Nothing End Select End If Devam: Next i Range("L:L").ClearContents xx = d1.Count Range("L1").Resize(d.Count) = Application.Transpose(d.keys) Range("M3").Resize(d1.Count) = Application.Transpose(d1.keys) Range("N3").Resize(d2.Count) = Application.Transpose(d2.keys) Range("O3").Resize(d3.Count) = Application.Transpose(d3.keys) Range("P3").Resize(d4.Count) = Application.Transpose(d4.keys) Range("Q3").Resize(d5.Count) = Application.Transpose(d5.keys) Range("R3").Resize(d6.Count) = Application.Transpose(d6.keys) Range("S3").Resize(d7.Count) = Application.Transpose(d7.keys) Range("T3").Resize(d8.Count) = Application.Transpose(d8.keys) Range("U3").Resize(d9.Count) = Application.Transpose(d9.keys) Range("V3").Resize(d10.Count) = Application.Transpose(d10.keys) End Sub
#DEĞER hatası varsa ne yapacak?
Sub ozet2()
Dim d As Object, i As Long, deg, son As Long, deg2
Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object
Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object
Set d = CreateObject("Scripting.Dictionary")
Set d1 = CreateObject("Scripting.Dictionary")
Set d2 = CreateObject("Scripting.Dictionary")
Set d3 = CreateObject("Scripting.Dictionary")
Set d4 = CreateObject("Scripting.Dictionary")
Set d5 = CreateObject("Scripting.Dictionary")
Set d6 = CreateObject("Scripting.Dictionary")
Set d7 = CreateObject("Scripting.Dictionary")
Set d8 = CreateObject("Scripting.Dictionary")
Set d9 = CreateObject("Scripting.Dictionary")
Set d10 = CreateObject("Scripting.Dictionary")
son = Cells(Rows.Count, "B").End(xlUp).Row
Application.ScreenUpdating = False
For i = 1 To son
deg = Cells(i, "B")
If Not d.exists(deg) Then
d.Add deg, Nothing
End If
If i < 3 Then GoTo Devam
If IsError(Cells(i, "I")) Then deg2 = "HATA": GoTo Atla1
If Len(Cells(i, "I")) = 5 And Cells(i, "I") = 0 Then GoTo Devam
deg2 = Cells(i, "I")
Atla1:
Sub ozet2()
Dim d As Object, i As Long, deg, son As Long, deg2
Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object
Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object
Set d = CreateObject("Scripting.Dictionary")
Set d1 = CreateObject("Scripting.Dictionary")
Set d2 = CreateObject("Scripting.Dictionary")
Set d3 = CreateObject("Scripting.Dictionary")
Set d4 = CreateObject("Scripting.Dictionary")
Set d5 = CreateObject("Scripting.Dictionary")
Set d6 = CreateObject("Scripting.Dictionary")
Set d7 = CreateObject("Scripting.Dictionary")
Set d8 = CreateObject("Scripting.Dictionary")
Set d9 = CreateObject("Scripting.Dictionary")
Set d10 = CreateObject("Scripting.Dictionary")
son = Cells(Rows.Count, "B").End(xlUp).Row
Application.ScreenUpdating = False
For i = 1 To son
deg = Cells(i, "B")
If Not d.exists(deg) Then
d.Add deg, Nothing
End If
If i < 3 Then GoTo Devam
If IsError(Cells(i, "I")) Then deg2 = "HATA": GoTo Atla1
On Error Resume Next
If Len(Cells(i, "I")) = 5 And Cells(i, "I") = 0 Then GoTo Devam
deg2 = Cells(i, "I")
Atla1:
Select Case Cells(i, "C")
Case Cells(2, 13)
d1.Add deg2, Nothing
Case Cells(2, 14)
d2.Add deg2, Nothing
Case Cells(2, 15)
d3.Add deg2, Nothing
Case Cells(2, 16)
d4.Add deg2, Nothing
Case Cells(2, 17)
d5.Add deg2, Nothing
Case Cells(2, 18)
d6.Add deg2, Nothing
Case Cells(2, 19)
d7.Add deg2, Nothing
Case Cells(2, 20)
d8.Add deg2, Nothing
Case Cells(2, 21)
d9.Add deg2, Nothing
Case Cells(2, 22)
d10.Add deg2, Nothing
End Select
Devam:
Next i
Range("L:L").ClearContents
Range("L1").Resize(d.Count) = Application.Transpose(d.keys)
Range("M3").Resize(d1.Count) = Application.Transpose(d1.keys)
Range("N3").Resize(d2.Count) = Application.Transpose(d2.keys)
Range("O3").Resize(d3.Count) = Application.Transpose(d3.keys)
Range("P3").Resize(d4.Count) = Application.Transpose(d4.keys)
Range("Q3").Resize(d5.Count) = Application.Transpose(d5.keys)
Range("R3").Resize(d6.Count) = Application.Transpose(d6.keys)
Range("S3").Resize(d7.Count) = Application.Transpose(d7.keys)
Range("T3").Resize(d8.Count) = Application.Transpose(d8.keys)
Range("U3").Resize(d9.Count) = Application.Transpose(d9.keys)
Range("V3").Resize(d10.Count) = Application.Transpose(d10.keys)
End Sub
Kesinlikle katılıyorum.Harika olan Bilgiyi paylaştıkça güzelleşen Excel.Web.Tr
Doğru ben atlamışım. Aşağıda kodun komplesi var.
C++:Sub ozet2() Dim d As Object, i As Long, deg, son As Long, deg2 Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object Set d = CreateObject("Scripting.Dictionary") Set d1 = CreateObject("Scripting.Dictionary") Set d2 = CreateObject("Scripting.Dictionary") Set d3 = CreateObject("Scripting.Dictionary") Set d4 = CreateObject("Scripting.Dictionary") Set d5 = CreateObject("Scripting.Dictionary") Set d6 = CreateObject("Scripting.Dictionary") Set d7 = CreateObject("Scripting.Dictionary") Set d8 = CreateObject("Scripting.Dictionary") Set d9 = CreateObject("Scripting.Dictionary") Set d10 = CreateObject("Scripting.Dictionary") son = Cells(Rows.Count, "B").End(xlUp).Row Application.ScreenUpdating = False For i = 1 To son deg = Cells(i, "B") If Not d.exists(deg) Then d.Add deg, Nothing End If If i < 3 Then GoTo Devam If IsError(Cells(i, "I")) Then deg2 = "HATA": GoTo Atla1 On Error Resume Next If Len(Cells(i, "I")) = 5 And Cells(i, "I") = 0 Then GoTo Devam deg2 = Cells(i, "I") Atla1: Select Case Cells(i, "C") Case Cells(2, 13) d1.Add deg2, Nothing Case Cells(2, 14) d2.Add deg2, Nothing Case Cells(2, 15) d3.Add deg2, Nothing Case Cells(2, 16) d4.Add deg2, Nothing Case Cells(2, 17) d5.Add deg2, Nothing Case Cells(2, 18) d6.Add deg2, Nothing Case Cells(2, 19) d7.Add deg2, Nothing Case Cells(2, 20) d8.Add deg2, Nothing Case Cells(2, 21) d9.Add deg2, Nothing Case Cells(2, 22) d10.Add deg2, Nothing End Select Devam: Next i Range("L:L").ClearContents Range("L1").Resize(d.Count) = Application.Transpose(d.keys) Range("M3").Resize(d1.Count) = Application.Transpose(d1.keys) Range("N3").Resize(d2.Count) = Application.Transpose(d2.keys) Range("O3").Resize(d3.Count) = Application.Transpose(d3.keys) Range("P3").Resize(d4.Count) = Application.Transpose(d4.keys) Range("Q3").Resize(d5.Count) = Application.Transpose(d5.keys) Range("R3").Resize(d6.Count) = Application.Transpose(d6.keys) Range("S3").Resize(d7.Count) = Application.Transpose(d7.keys) Range("T3").Resize(d8.Count) = Application.Transpose(d8.keys) Range("U3").Resize(d9.Count) = Application.Transpose(d9.keys) Range("V3").Resize(d10.Count) = Application.Transpose(d10.keys) End Sub
Sub ozetyenı()
Dim d As Object, i As Long, deg, son As Long, deg2
Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object
Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object, d11 As Object
Set d = CreateObject("Scripting.Dictionary")
Set d1 = CreateObject("Scripting.Dictionary")
Set d2 = CreateObject("Scripting.Dictionary")
Set d3 = CreateObject("Scripting.Dictionary")
Set d4 = CreateObject("Scripting.Dictionary")
Set d5 = CreateObject("Scripting.Dictionary")
Set d6 = CreateObject("Scripting.Dictionary")
Set d7 = CreateObject("Scripting.Dictionary")
Set d8 = CreateObject("Scripting.Dictionary")
Set d9 = CreateObject("Scripting.Dictionary")
Set d10 = CreateObject("Scripting.Dictionary")
Set d11 = CreateObject("Scripting.Dictionary")
son = Cells(Rows.Count, "B").End(xlUp).Row
Application.ScreenUpdating = False
For i = 1 To son
deg = Cells(i, "B")
If Not d.exists(deg) Then
d.Add deg, Nothing
End If
If i < 3 Then GoTo Devam
If IsError(Cells(i, "I")) Then deg2 = "HATA": GoTo Atla1
On Error Resume Next
If Len(Cells(i, "I")) = 5 And Cells(i, "I") = 0 Then GoTo Devam
deg2 = Cells(i, "I")
Atla1:
Select Case Cells(i, "C")
Case Cells(2, 13)
d1.Add deg2, Nothing
Case Cells(2, 14)
d2.Add deg2, Nothing
Case Cells(2, 15)
d3.Add deg2, Nothing
Case Cells(2, 16)
d4.Add deg2, Nothing
Case Cells(2, 17)
d5.Add deg2, Nothing
Case Cells(2, 18)
d6.Add deg2, Nothing
Case Cells(2, 19)
d7.Add deg2, Nothing
Case Cells(2, 20)
d8.Add deg2, Nothing
Case Cells(2, 21)
d9.Add deg2, Nothing
Case Cells(2, 22)
d10.Add deg2, Nothing
Case Cells(2, 23)
d11.Add deg2, Nothing
End Select
Devam:
Next i
Range("L:L").ClearContents
Range("L1").Resize(d.Count) = Application.Transpose(d.keys)
Range("M3").Resize(d1.Count) = Application.Transpose(d1.keys)
Range("N3").Resize(d2.Count) = Application.Transpose(d2.keys)
Range("O3").Resize(d3.Count) = Application.Transpose(d3.keys)
Range("P3").Resize(d4.Count) = Application.Transpose(d4.keys)
Range("Q3").Resize(d5.Count) = Application.Transpose(d5.keys)
Range("R3").Resize(d6.Count) = Application.Transpose(d6.keys)
Range("S3").Resize(d7.Count) = Application.Transpose(d7.keys)
Range("T3").Resize(d8.Count) = Application.Transpose(d8.keys)
Range("U3").Resize(d9.Count) = Application.Transpose(d9.keys)
Range("V3").Resize(d10.Count) = Application.Transpose(d10.keys)
Range("W3").Resize(d11.Count) = Application.Transpose(d11.keys)
End Sub
Merhaba Ömer bey ,Nereye ne ekledinizi söyler misiniz? Ya da ekledim dediklerinizi renkli işaretleyerek dosyanızı yeniden paylaşır mısınız?
Sub ozetyenı()
Dim d As Object, i As Long, deg, son As Long, deg2
Dim d1 As Object, d2 As Object, d3 As Object, d4 As Object, d5 As Object
Dim d6 As Object, d7 As Object, d8 As Object, d9 As Object, d10 As Object, d11 As Object 'd11 EKLENDİ
Set d = CreateObject("Scripting.Dictionary")
Set d1 = CreateObject("Scripting.Dictionary")
Set d2 = CreateObject("Scripting.Dictionary")
Set d3 = CreateObject("Scripting.Dictionary")
Set d4 = CreateObject("Scripting.Dictionary")
Set d5 = CreateObject("Scripting.Dictionary")
Set d6 = CreateObject("Scripting.Dictionary")
Set d7 = CreateObject("Scripting.Dictionary")
Set d8 = CreateObject("Scripting.Dictionary")
Set d9 = CreateObject("Scripting.Dictionary")
Set d10 = CreateObject("Scripting.Dictionary")
Set d11 = CreateObject("Scripting.Dictionary")
son = Cells(Rows.Count, "B").End(xlUp).Row
For i = 1 To son
deg = Cells(i, "B")
If Not d.exists(deg) Then
d.Add deg, Nothing
End If
If i < 3 Then GoTo Devam
If IsError(Cells(i, "I")) Then deg2 = "HATA": GoTo Atla1
If Len(Cells(i, "I")) = 5 And Cells(i, "I") = 0 Then GoTo Devam
deg2 = Cells(i, "I")
Atla1:
Select Case Cells(i, "C")
Case Cells(2, 13)
d1key = d1key + 1
d1.Add d1key, deg2
Case Cells(2, 14)
d2key = d2key + 1
d2.Add d2key, deg2
Case Cells(2, 15)
d3key = d3key + 1
d3.Add d3key, deg2
Case Cells(2, 16)
d4key = d4key + 1
d4.Add d4key, deg2
Case Cells(2, 17)
d5key = d5key + 1
d5.Add d5key, deg2
Case Cells(2, 18)
d6key = d6key + 1
d6.Add d6key, deg2
Case Cells(2, 19)
d7key = d7key + 1
d7.Add d7key, deg2
Case Cells(2, 20)
d8key = d8key + 1
d8.Add d8key, deg2
Case Cells(2, 21)
d9key = d9key + 1
d9.Add d9key, deg2
Case Cells(2, 22)
d10key = d10key + 1
d10.Add d10key, deg2
Case Cells(2, 23)
d11key = d11key + 1
d11.Add d11key, deg2
End Select
Devam:
Next i
Range("L:L").ClearContents
Range("L1").Resize(d.Count) = Application.Transpose(d.keys)
Range("M3").Resize(d1.Count) = Application.Transpose(d1.Items)
Range("N3").Resize(d2.Count) = Application.Transpose(d2.Items)
Range("O3").Resize(d3.Count) = Application.Transpose(d3.Items)
Range("P3").Resize(d4.Count) = Application.Transpose(d4.Items)
Range("Q3").Resize(d5.Count) = Application.Transpose(d5.Items)
Range("R3").Resize(d6.Count) = Application.Transpose(d6.Items)
Range("S3").Resize(d7.Count) = Application.Transpose(d7.Items)
Range("T3").Resize(d8.Count) = Application.Transpose(d8.Items)
Range("U3").Resize(d9.Count) = Application.Transpose(d9.Items)
Range("V3").Resize(d10.Count) = Application.Transpose(d10.Items)
Range("W3").Resize(d11.Count) = Application.Transpose(d11.Items)
End Sub