
Option Explicit
Sub abc()
Dim a, b, i, j
a = [a1].CurrentRegion.Offset(1).Resize(, 3).Value
b = Array(10, 30, 50, 100)
ReDim c(1 To UBound(a) - 1, 1 To 5)
For i = 1 To UBound(a) - 1
c(i, 1) = 1
For j = UBound(b) To 0 Step -1
If a(i, 3) \ b(j) > 0 Then
c(i, j + 2) = a(i, 3) \ b(j)
a(i, 3) = a(i, 3) Mod b(j)
If a(i, 3) = 0 Then Exit For
End If
Next
Next
[d2].Resize(UBound(c), UBound(c, 2)) = c
End Sub