- Katılım
- 3 Mart 2009
- Mesajlar
- 519
- Excel Vers. ve Dili
- excel 2003 tr
Public Function YA(Dizi, satır, Ax)
Application.Volatile
ay7 = Range("AY" & 7).Value
Sat = satır + ay7
aa = WorksheetFunction.Index(Dizi, (Sat - (0 - Ax)))
a = WorksheetFunction.Index(Dizi, (Sat - (9 - Ax)))
b = WorksheetFunction.Index(Dizi, (Sat - (8 - Ax)))
c = WorksheetFunction.Index(Dizi, (Sat - (7 - Ax)))
d = WorksheetFunction.Index(Dizi, (Sat - (6 - Ax)))
e = WorksheetFunction.Index(Dizi, (Sat - (5 - Ax)))
f = WorksheetFunction.Index(Dizi, (Sat - (4 - Ax)))
g = WorksheetFunction.Index(Dizi, (Sat - (3 - Ax)))
h = WorksheetFunction.Index(Dizi, (Sat - (2 - Ax)))
i = WorksheetFunction.Index(Dizi, (Sat - (1 - Ax)))
j = WorksheetFunction.Index(Dizi, (Sat - (0 - Ax)))
x1 = WorksheetFunction.Or(a = aa)
x2 = WorksheetFunction.Or(b = a)
x3 = WorksheetFunction.Or(c = b, c = a)
x4 = WorksheetFunction.Or(d = c, d = b, d = a)
x5 = WorksheetFunction.Or(e = d, e = c, e = b, e = a)
x6 = WorksheetFunction.Or(f = e, f = d, f = c, f = b, f = a)
x7 = WorksheetFunction.Or(g = f, g = e, g = d, g = c, g = b, g = a)
x8 = WorksheetFunction.Or(h = g, h = f, h = e, h = d, h = c, h = b, h = a)
x9 = WorksheetFunction.Or(i = h, i = g, i = f, i = e, i = d, i = c, i = b, i = a)
x10 = WorksheetFunction.Or(j = i, j = h, j = g, j = f, j = e, j = d, j = c, j = b, j = a)
If Ax = 0 Then
If x10 = True Then
YA = ""
Else
YA = j
End If
End If
If Ax = 1 Then
If x9 = True Then
YA = ""
Else
YA = i
End If
End If
If Ax = 2 Then
If x8 = True Then
YA = ""
Else
YA = h
End If
End If
If Ax = 3 Then
If x7 = True Then
YA = ""
Else
YA = g
End If
End If
If Ax = 4 Then
If x6 = True Then
YA = ""
Else
YA = f
End If
End If
If Ax = 5 Then
If x5 = True Then
YA = ""
Else
YA = e
End If
End If
If Ax = 6 Then
If x4 = True Then
YA = ""
Else
YA = d
End If
End If
If Ax = 7 Then
If x3 = True Then
YA = ""
Else
YA = c
End If
End If
If Ax = 8 Then
If x2 = True Then
YA = ""
Else
YA = b
End If
End If
If Ax = 9 Then
If x1 = True Then
YA = ""
Else
YA = a
End If
End If
End Function
Bu Kodla işlemi çözdüm fakat ben ilk on satıra veri alıyorum, sonsuz döngü mümkümmü bilmiyorum geliştirmek istiyenlere kodu ve örnek dosyayı gönderiyorum
herşey için teşekürler...
Application.Volatile
ay7 = Range("AY" & 7).Value
Sat = satır + ay7
aa = WorksheetFunction.Index(Dizi, (Sat - (0 - Ax)))
a = WorksheetFunction.Index(Dizi, (Sat - (9 - Ax)))
b = WorksheetFunction.Index(Dizi, (Sat - (8 - Ax)))
c = WorksheetFunction.Index(Dizi, (Sat - (7 - Ax)))
d = WorksheetFunction.Index(Dizi, (Sat - (6 - Ax)))
e = WorksheetFunction.Index(Dizi, (Sat - (5 - Ax)))
f = WorksheetFunction.Index(Dizi, (Sat - (4 - Ax)))
g = WorksheetFunction.Index(Dizi, (Sat - (3 - Ax)))
h = WorksheetFunction.Index(Dizi, (Sat - (2 - Ax)))
i = WorksheetFunction.Index(Dizi, (Sat - (1 - Ax)))
j = WorksheetFunction.Index(Dizi, (Sat - (0 - Ax)))
x1 = WorksheetFunction.Or(a = aa)
x2 = WorksheetFunction.Or(b = a)
x3 = WorksheetFunction.Or(c = b, c = a)
x4 = WorksheetFunction.Or(d = c, d = b, d = a)
x5 = WorksheetFunction.Or(e = d, e = c, e = b, e = a)
x6 = WorksheetFunction.Or(f = e, f = d, f = c, f = b, f = a)
x7 = WorksheetFunction.Or(g = f, g = e, g = d, g = c, g = b, g = a)
x8 = WorksheetFunction.Or(h = g, h = f, h = e, h = d, h = c, h = b, h = a)
x9 = WorksheetFunction.Or(i = h, i = g, i = f, i = e, i = d, i = c, i = b, i = a)
x10 = WorksheetFunction.Or(j = i, j = h, j = g, j = f, j = e, j = d, j = c, j = b, j = a)
If Ax = 0 Then
If x10 = True Then
YA = ""
Else
YA = j
End If
End If
If Ax = 1 Then
If x9 = True Then
YA = ""
Else
YA = i
End If
End If
If Ax = 2 Then
If x8 = True Then
YA = ""
Else
YA = h
End If
End If
If Ax = 3 Then
If x7 = True Then
YA = ""
Else
YA = g
End If
End If
If Ax = 4 Then
If x6 = True Then
YA = ""
Else
YA = f
End If
End If
If Ax = 5 Then
If x5 = True Then
YA = ""
Else
YA = e
End If
End If
If Ax = 6 Then
If x4 = True Then
YA = ""
Else
YA = d
End If
End If
If Ax = 7 Then
If x3 = True Then
YA = ""
Else
YA = c
End If
End If
If Ax = 8 Then
If x2 = True Then
YA = ""
Else
YA = b
End If
End If
If Ax = 9 Then
If x1 = True Then
YA = ""
Else
YA = a
End If
End If
End Function
Bu Kodla işlemi çözdüm fakat ben ilk on satıra veri alıyorum, sonsuz döngü mümkümmü bilmiyorum geliştirmek istiyenlere kodu ve örnek dosyayı gönderiyorum
herşey için teşekürler...
Ekli dosyalar
Son düzenleme:
