Here's a copy of your last example using named ranges to eliminate the errors in my formula.
John has provided the same to show his formulas working, but just to add that the extra rows that were in your sample file (using John's method) were caused by the formula in B8. A formula that returns a blank with "" is still counted when using COUNTA.
In the file I've attached, I changed COUNTA to COUNT in John's formulas, but if the references in column B, which are used to define the number of rows, are not numeric, then COUNT will not see them.
** The named ranges behind my formulas use COUNT to find the last row, so they will also suffer the same fate.
Bookmarks