First, to get the dates automatically:
In F2
=MIN(D3,D4)
G2
=F2+1
Drag across.
Second,
In F3:
=IF(F$2<$D3,0,IF(F$2=$D3,$E3,MIN($C3-SUM(E3:$F3),$B3)*(WEEKDAY(F$2,2)<6)))
If Date is earlier Start date, => 0, if date is start date, start qtty, if later than, take MIN (of daily out put or the balance). If date fall in Weekend (weekday<6) all return 0
Drag down and across.
Bookmarks