FOR-NEXT

Katılım
24 Mayıs 2005
Mesajlar
462
Excel Vers. ve Dili
Excel 2003 Türkçe
For a = 2 To 15
If UCase(Format(s2.Cells(a, 1), "mmmm")) = ComboBox1.Value Then
For say = 1 To bb
If Adlar(say) = s2.Cells(a, 2) Then GoTo BIR
Next say
If say = bb + 1 Then
Adlar(say) = s2.Cells(a, 2)
bb = bb + 1
End If
BIR:
cc = cc + s2.Cells(a, 3).Value
dd = dd + s2.Cells(a, 4).Value
ee = ee + s2.Cells(a, 5).Value
End If
Next a
For a = 2 To 15
If UCase(Format(s2.Cells(a, 1), "mmmm")) = ComboBox1.Value Then
For say = 1 To ff
If Adlar(say) = s2.Cells(a, 6) Then GoTo iki
Next say
iki:
If say = ff + 1 Then
Adlar(say) = s2.Cells(a, 6)
ff = ff + 1
End If
End If Next a

Kırmızı olanlar yukarıdaki ile aynı bu kodu daha kısa yazmanın yolu varmıdır. Saygılarımla
 
Üst