A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Let's say you enter the total 7.8 in a cell, say F1.
In C2, enter the formula
=MIN(IF(B2="Large",0.25,IF(B2="Small",0.1,0)),$F$1-SUM(C$1:C1))
and fill down.