The idea colld be illustrated with:
Check how it works with all 3 sheets of sample data.
key points are:
working until there is something in recently completed column
going down-up in desults sheet to easily add rows (rows below move down, but in next step we are anyway a row up, so dont't care abou what happened below
finding not one, but all :
instances of predcessor in column A of source
(match range is from one below found in previous step till the end of data.
Of course you can now finetune it, add columns widths etc. but the algorithm shall work fine. May be look for more efficient data structures, because here all processing occurs in the spreadsheet.
Final comment: I added a security check
to let user intervene in case of looped data like
Long post, isn't it?
Bookmarks