Calculate Where an Item is Stored
Goal: When I do a find, for example, item #1709 the location shows Bin #1. I don't want to manually key the bin number for each item.
- I have a table that contains the item numbers that I have as well as other information about the item
- Sample item numbers: 1501, 1709, 2365, 3948, 5346, 23301, etc.
- Each bin holds 32 items
- Bin 1 would contain the first 32 items in ascending order - 1501, 1709, 1710, 1855, etc. In this case I don't have item #1502 through #1708 or #1711 through #1854.
- Bin 2 would contain the next 32 items in ascending order
What I think needs to happen:
- Sort the data base into item number order - no problem doing that
- Find the first 32 items and assign them bin #1
- Find the next 32 items and assign them bin #2
- I don't know how to find the first 32 items of the table and assign them bin #1. Example #1501 - #01, #1709 - #01, #1710 - #01, etc.
- After the first 32 items, the next 32 would be assigned bin #2, and so on.
- Also, if I obtain item #1505, it would go into bin #1 based upon the sample information above. But, since the first 32 items are already assigned to bin #1, the last item in bin #1 would move to bin #2. If bin #2 already had 32 items, the last item in bin #2 move to bin #3 etc.
- And if I remove item #1710, bin 1 would be filled back to 32 items by moving an item from bin 2. Then bin 2 would be filled back to 32 items by moved an item from bin 3, etc.
I know this is probably a very strange request