Thanks for the ideas. Maybe I should have mentioned that no cells involved will ever span a page so that's not an issue.
However, I have to report that only the code supplied by Guessed gives the right answer (at least in my environment) . The other two always come up with 1 line no matter how many there are (there will be from 1 to 5 in practice).
|