Enter in E1 and copy down:
=IF(ROWS($1:1)<=$C$4,ROWS($1:1),IF(ROWS($1:1)<=$C$ 4+$C$5,ROW()-$C$4,IF(ROWS($1:1)<=$C$4+$C$5+$C$6,ROW()-$C$4-$C$5"")))
If you start in another cell than E1, for example H8 the formula should look like this:
IF(ROWS($1:1)<=$C$4,ROWS($1:1),IF(ROWS($1:1)<=$C$4 +$C$5,ROW()-CELL("row",$H$8)+1-$C$4,IF(ROWS($1:1)<=$C$4+$C$5+$C$6,ROW()-CELL("row",$H$8)+1-$C$4-$C$5;"")))
The two CELL functions must have the start cell as second argument.
|