Hi,
I seem to be able to use index/match for a specific scenario but struggling to apply it to others so looking for some help - maybe that's not even the best way of doing it.
I have two data sources a list of products and another data source with the products, order despatch dates and shortages.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product[/TD]
[TD]First Shortage[/TD]
[TD]First Shortage Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]123[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]456[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]789[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The source data I'm looking to draw from is similar to the below:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product[/TD]
[TD]Order Date[/TD]
[TD]Shortage[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]123[/TD]
[TD]02/05/2018[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]123[/TD]
[TD]15/06/2018[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]123[/TD]
[TD]17/07/2018[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]456[/TD]
[TD]01/01/2019[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]456[/TD]
[TD]02/01/2019[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]456[/TD]
[TD]02/02/2019[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]456[/TD]
[TD]03/03/2019[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]789[/TD]
[TD]01/12/2017[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]789[/TD]
[TD]01/01/2018[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
I'm looking for a formula that will return the first time we're going to be short on a product and the date that the first shortage will occur. Here are the results i'd expect below.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product[/TD]
[TD]First Shortage[/TD]
[TD]First Shortage Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]123[/TD]
[TD]5[/TD]
[TD]17/07/2018[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]456[/TD]
[TD]1[/TD]
[TD]01/01/2019[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]789[/TD]
[TD]5[/TD]
[TD]01/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
How am i best to do it? Any ideas?
Thanks in advance.
L
I seem to be able to use index/match for a specific scenario but struggling to apply it to others so looking for some help - maybe that's not even the best way of doing it.
I have two data sources a list of products and another data source with the products, order despatch dates and shortages.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product[/TD]
[TD]First Shortage[/TD]
[TD]First Shortage Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]123[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]456[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]789[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The source data I'm looking to draw from is similar to the below:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product[/TD]
[TD]Order Date[/TD]
[TD]Shortage[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]123[/TD]
[TD]02/05/2018[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]123[/TD]
[TD]15/06/2018[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]123[/TD]
[TD]17/07/2018[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]456[/TD]
[TD]01/01/2019[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]456[/TD]
[TD]02/01/2019[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]456[/TD]
[TD]02/02/2019[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]456[/TD]
[TD]03/03/2019[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]789[/TD]
[TD]01/12/2017[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]789[/TD]
[TD]01/01/2018[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
I'm looking for a formula that will return the first time we're going to be short on a product and the date that the first shortage will occur. Here are the results i'd expect below.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Product[/TD]
[TD]First Shortage[/TD]
[TD]First Shortage Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]123[/TD]
[TD]5[/TD]
[TD]17/07/2018[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]456[/TD]
[TD]1[/TD]
[TD]01/01/2019[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]789[/TD]
[TD]5[/TD]
[TD]01/01/2018[/TD]
[/TR]
</tbody>[/TABLE]
How am i best to do it? Any ideas?
Thanks in advance.
L