- Katılım
- 22 Eylül 2008
- Mesajlar
- 83
- Excel Vers. ve Dili
- 2007
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Toplamı_Dağıt()
On Error Resume Next
For i = 2 To 6
ayır = Split(Cells(ActiveCell.Row, i), "-")
Cells(ActiveCell.Row - 1, i) = (ayır(1) - 1) - ayır(0) + 1 '
Next i
toplam = [b2]
böl = 5: a = 1
elma = ActiveCell.Offset(-1, 0).Value
For i = 2 To 6
If (toplam / böl) > elma Then
al = elma - (toplam / böl)
ActiveCell.Offset(1, 0).Value = ((toplam / böl) + al)
If ActiveCell.Offset(1, 0).Value <> "" Then
Range(Cells(ActiveCell.Offset(1, 0).Row, 3), _
Cells(ActiveCell.Offset(1, 0).Row, 5)).Value = Cells(ActiveCell.Row - 1, 3) + 1
End If
If toplam > (4 * ((toplam / böl) + al)) Then
sonuç = sonuç + Cells(ActiveCell.Row + 1, i)
End If
End If
Next i
ActiveCell.Offset(1, 4).Value = toplam - sonuç
End Sub