Here's a sample solution using formulae. The first part, to get your row 8 (my 9) turned out to be simpler than I thought. The whole thing is a little kludgy; I'd probably write a worksheet function, myself, especially if the actual data is much, much larger.
|