Hi,

As shown below I want to create a dynamic range in excel vba till split 50 to 9 segments.
It should stop when the left count becomes 0.

No. of Segments 9
no of flowers 50

No. of Segments Flowers in each segment Left
9 5 45
8 5 40
7 5 35
6 5 30
5 6 24
4 6 18
3 6 12
2 6 6
1 6 0
0 #DIV/0! #DIV/0!

Please suggest
calculate.xlsx