View Single Post
 
Old 03-14-2017, 10:27 PM
xor xor is offline Windows 10 Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,101
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

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.
Reply With Quote