
Originally Posted by
Glenn Kennedy
If you do not need backward compatability with old Excel versions...
In B2, copied down as far as the last row:
=IF(ISNUMBER(A2),1+B1,0)
In D2, use this array formula, copied across and down:
=IFERROR(INDEX($A:$A,SMALL(IF(B1:$B$317=ROWS($D$1:$D1),ROW(B1:$B$317)),COLUMNS($A:A))),"")
Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly brackets yourself - it won't work...
Bookmarks