Hi,
Tabla A
Part Available stock Sales # Age in days M45612 1 901004816 40 M45612 2 901006075 37 M45612 8 901004860 35 M45612 4 901003870 35
Tabla B
Part ID # Sales # M45612 74682 M45612 7D481 M45612 7D358
I have two tables, as I can get in “Table B” the results of the column Sales # automatically looking at “Table A” considering the available stock quantity and age in days. The result should look like this.
Part ID # Sales # M45612 74682 901004816 M45612 7D481 901006075 M45612 7D358 901006075