List items based on the count given
Hopefully, this will help get started.
I lengthened columns A and B to test better for zeros.
Update:
Instead of "=A2" put this in E2:
=IF(B2=0, INDEX(A:A,D2+2),A2)
This takes care of the case when cell B2 contains 0.
|