Hi, thanks for your help, Richard.
Is there a way to allow for such duplicates in the other places? The data I'll be restructuring has over 12000 rows, so I'm sure there will be all sorts of possible permutations of such anomalies. Here is your file where I made up some data to reveal problems with code.
Bookmarks