4 Replies Latest reply on Oct 12, 2009 8:59 AM by comment_1

    How to determine where a certain item is located

    jdhelle

      Title

      How to determine where a certain item is located

      Post

       

        • 1. Re: How to determine where a certain item is located
          comment_1
             I am not sure I understand this. 15 * 32 = 480, so where is the number 425 coming from? I guess you want the Div() function, but...
          • 2. Re: How to determine where a certain item is located
            comment_1
              

            jdhelle wrote:

            The 480 is the total number of pieces that could be stored in the 15 containers but, currently only have 425 total pieces.  Hopefully, that helps clarify.


            I am still somewhat confused. You have 425 items and 480 slots to put them in. If item #278 will always be in slot #278, then slot and item are the same thing - it's just that a slot can be empty or full. If not, then the item number tells us nothing about the item's location. Either way, the question should really be in which container is slot #278. And the answer to that is =

             

            Div ( SlotNumber - 1 ; 32 ) + 1


            • 3. Re: How to determine where a certain item is located
              jdhelle
                

              After more thought of what I'm trying to accomplish, I need to provide much more detail.

               

              Goal: When I find, for example, item #1709 it shows the location as Bin #1.

               

              Data:

               

              - 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

              - etc. 

               

              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

              - etc.

               

              Problem:

               

              -  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  

               

               

              I'm sorry for the confusion I caused from lack of details.

               

              • 4. Re: How to determine where a certain item is located
                comment_1
                  

                jdhelle wrote:

                I know this is probably a very strange request


                Yes, because it's hard to imagine what is being represented here. In real life, items do not shift automatically when you add an item to the first bin.

                 

                 

                Anyway, an unstored calculation =

                 

                Div ( Get (RecordNumber) - 1 ; 32 ) + 1

                 

                should return the result you want - as long as records are kept found and sorted.