Glad to help.

FYI, it's prone to give erroneous results if a row is inserted/deleted above row2

The other one is actually 'better', but didn't quite satisfy your needs.