This problem is indeed not vba specific.
For each box, add a label when it was added to the storage.
You may take the point in time as a timestamp, iteration number or whatever unit suits you.
Then you can now evaluate the time the box spent in storage by calculating now-time_when_box_was_added, for every single box. What you do with that value is up to you (take min, max, average, …).
solved Algorithm needed for product aging in a storage [closed]