I have kind of a heirarchy of ID numbers that I'm working with... so if the ID is A, appropriate subcategory IDs would be 0,1,..,B.

I'd like to make a drop-down list of subcategory IDs given a particular ID. The way I have it set up now is that I have a sheet with, among other things, a column of As and a column of Bs where each row corresponds to an appropriate pairing:

ID SubID
12345 0
12345 1
12345 2
12345 3
23456 0
23456 1

So I can pull out the appropriate B given A easily enough from this list, but I'm having trouble coming up with a way to make the data validation drop-down list values from 0 to B. If there's a way to organize this sheet to make it more easy to make a validation list, I could do that too.