Just want to put a huge thanks out to Matt Warden for helping me on this off-list. He had an idea of creating a qtyranges() array and was the key to making this happen.