I'm in need of something like this right now for a project I'm working on, almost wrote the function myself. Good thing we have Substance Share. Thank you for this, saved me some time :]
You're welcome. Was a good amount of grunt work, remember hand sorting the 220 inputs quite well...