https://www.excelforum.com/excel-for...n-dataset.html
Post #8
I solved the initial question but my solution to the follow up (post 8) would be very long. I think one of you formula geniuses can come up with something shorter.