Below is an example of the data that I'm trying to analyse and I need 2 formulas to look up a style code and find the week when it was first stocked (i.e. the inventory column first showed a value for that code) and the week it went out of stock (i.e. the inventory was 0). A couple points to note, I can't look for the first occurrence of the style code as the data shows several weeks with 0 inventory in the first few weeks. Also the inventory may go to 0 several times over the time period, I want to find the last time it went to 0.
The answers I'd be looking for in the below example is:
Style A1234 came into stock in week 2 and went out of stock in week 4.
Style B2345 came into stock in week 3 and went out of stock in week 5.
<tbody>
</tbody>
Can anyone help please??
The answers I'd be looking for in the below example is:
Style A1234 came into stock in week 2 and went out of stock in week 4.
Style B2345 came into stock in week 3 and went out of stock in week 5.
Style Code | Week | Inventory |
A1234 | 1 | |
A1234 | 2 | 200 |
A1234 | 3 | 100 |
A1234 | 4 | |
A1234 | 5 | |
B2345 | 1 | |
B2345 | 2 | |
B2345 | 3 | 50 |
B2345 | 4 | 10 |
B2345 | 5 |
<tbody>
</tbody>
Can anyone help please??