Kombinasyon hesaplama

Katılım
15 Mart 2009
Mesajlar
50
Excel Vers. ve Dili
office 2003 türkçe
Arkdaşlar excel de bu türden kombinasyonu hesaplatamadım farklı bi yöntemi varsa yardımcı olabiirmisiiz

12 rakamın 6 lı kombinasyonu fakat şu mantıkta

123-124-125-126-127-128
123-124-125-126-127-129..
 
Katılım
15 Mart 2009
Mesajlar
50
Excel Vers. ve Dili
office 2003 türkçe
Arkadaşlar ne tür bi formül kullanarak bu türden kombinasyonları hesaplayabiliriz bi bilginiz yokmu
 

fedeal

Banned
Katılım
29 Mayıs 2008
Mesajlar
1,985
Excel Vers. ve Dili
2003 tr
Daha öncede bu konuya yakın bir sorunuz vardı zannedersem çözüm bulamamıştınız.Bir deneme daha yaptım istediginiz bumu?
not:hesaplamanın bitmesini beklemedim umarım sonlara dogru hata vermez.

Kod:
Sub n()
Dim a, b, c, d, e, f, z As Integer
Dim s As Long
s = 1
z = 3
For a = 1 To 12
For b = 1 To 12
For c = 1 To 12
For d = 1 To 12
For e = 1 To 12
For f = 1 To 12
If s >= 65535 Then
s = 1
z = z + 1
Else
Cells(s, z).Value = Cells(a, 1).Value & "-" & Cells(b, 1).Value & "-" & Cells(c, 1).Value & "-" & Cells(d, 1).Value & "-" & Cells(e, 1).Value & "-" & Cells(f, 1).Value
s = s + 1
End If
Next
Next
Next
Next
Next
Next
End Sub
 

Ekli dosyalar

  • 6.3 KB Görüntüleme: 34

fedeal

Banned
Katılım
29 Mayıs 2008
Mesajlar
1,985
Excel Vers. ve Dili
2003 tr
altı rakam farklı olmalıysa;
Kod:
Sub n()
Dim a, b, c, d, e, f, z As Integer
Dim s As Long
s = 1
z = 3
For a = 1 To 12
For b = 1 To 12
For c = 1 To 12
For d = 1 To 12
For e = 1 To 12
For f = 1 To 12
If s >= 65535 Then
s = 1
z = z + 1
Else
If Cells(a, 1).Value = Cells(b, 1).Value Or Cells(a, 1).Value = Cells(c, 1).Value Or Cells(a, 1).Value = Cells(d, 1).Value Or Cells(a, 1).Value = Cells(e, 1).Value Or Cells(a, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(b, 1).Value = Cells(c, 1).Value Or Cells(b, 1).Value = Cells(d, 1).Value Or Cells(b, 1).Value = Cells(e, 1).Value Or Cells(b, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(c, 1).Value = Cells(d, 1).Value Or Cells(c, 1).Value = Cells(e, 1).Value Or Cells(c, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(d, 1).Value = Cells(e, 1).Value Or Cells(d, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(e, 1).Value = Cells(f, 1).Value Then GoTo w
Cells(s, z).Value = Cells(a, 1).Value & "-" & Cells(b, 1).Value & "-" & Cells(c, 1).Value & "-" & Cells(d, 1).Value & "-" & Cells(e, 1).Value & "-" & Cells(f, 1).Value
s = s + 1
w:
End If
Next
Next
Next
Next
Next
Next
End Sub
 

Ekli dosyalar

  • 7.1 KB Görüntüleme: 28

fedeal

Banned
Katılım
29 Mayıs 2008
Mesajlar
1,985
Excel Vers. ve Dili
2003 tr
buda tamamen benzersiz olanı (uzun sürmesi normal yaklaşık 2,5 milyon işlem yapıyor)
Kod:
Sub n()
Dim a, b, c, d, e, f, z, by1, by2, by3, by4, by5, by6 As Integer
Dim s As Long
s = 1
z = 3
For a = 1 To 12
For b = 1 To 12
For c = 1 To 12
For d = 1 To 12
For e = 1 To 12
For f = 1 To 12
If s >= 65535 Then
s = 1
z = z + 1
Else
If Cells(a, 1).Value = Cells(b, 1).Value Or Cells(a, 1).Value = Cells(c, 1).Value Or Cells(a, 1).Value = Cells(d, 1).Value Or Cells(a, 1).Value = Cells(e, 1).Value Or Cells(a, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(b, 1).Value = Cells(c, 1).Value Or Cells(b, 1).Value = Cells(d, 1).Value Or Cells(b, 1).Value = Cells(e, 1).Value Or Cells(b, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(c, 1).Value = Cells(d, 1).Value Or Cells(c, 1).Value = Cells(e, 1).Value Or Cells(c, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(d, 1).Value = Cells(e, 1).Value Or Cells(d, 1).Value = Cells(f, 1).Value Then GoTo w
If Cells(e, 1).Value = Cells(f, 1).Value Then GoTo w
Cells(100, 1).Value = Cells(a, 1).Value
Cells(101, 1).Value = Cells(b, 1).Value
Cells(102, 1).Value = Cells(c, 1).Value
Cells(103, 1).Value = Cells(d, 1).Value
Cells(104, 1).Value = Cells(e, 1).Value
Cells(105, 1).Value = Cells(f, 1).Value
by1 = WorksheetFunction.Large(Range("a100:a105"), 1)
by2 = WorksheetFunction.Large(Range("a100:a105"), 2)
by3 = WorksheetFunction.Large(Range("a100:a105"), 3)
by4 = WorksheetFunction.Large(Range("a100:a105"), 4)
by5 = WorksheetFunction.Large(Range("a100:a105"), 5)
by6 = WorksheetFunction.Large(Range("a100:a105"), 6)
sıra = by6 & "-" & by5 & "-" & by4 & "-" & by3 & "-" & by2 & "-" & by1
If WorksheetFunction.CountIf(Range("c1:c65535"), sıra) >= 1 Then GoTo w
Cells(s, z).Value = sıra
s = s + 1
w:
End If
Next
Next
Next
Next
Next
Next
End Sub
 

Ekli dosyalar

  • 9.8 KB Görüntüleme: 36
Katılım
15 Mart 2009
Mesajlar
50
Excel Vers. ve Dili
office 2003 türkçe
fedeal teşekkür ederim birde kagıt üzerinde kısadan hesaplama yöntemi nedir
 
Katılım
13 Ağustos 2011
Mesajlar
2
Excel Vers. ve Dili
2007 - Türkçe
kombinasyon

merhaba

15 Sayının 13 lü kombinasyonunu yapabilecek bir formül arıyorum..

yardımcı olabilirmisiniz
 
Üst