Sure.
To help clarify, Period 1 is the most recent period. Period 8 was 8 periods (weeks/months) ago.
Column B is the current code, which is easy -- Period 1 is the current period, so whatever is in that column is the current code
Column C finds most recent non-zero code that was used, before the current non-zero code. So for example, for the 'Apple' item - The current code is 1, the most recent code that was not "code 1" was "code 2", back in period 4. Therefore, the answer is that "Code 2" was the prior non-zero code. For banana, the most recent non zero code change went from 2 to 1. Therefore, the prior non-zero code was code 2.
Column D finds out when the last code change was. Any time the code changes - e.g. from 2 to 1, from 1 to 0(blank), etc., it's considered a code change. For apple, the last code change was from code 2 to code 1, in period 4. Therefore it has been 4 periods since the last code change. For banana, the last code change was from 1 to blank(0), in period 1, which means it has been 1 period since the code changed.
I realize now that column E was too difficult to explain, so I have revised the table as such:
pic3.PNG
The new column E finds out many periods since there was a code. If there is currently a code, the answer is zero. If there has never been a code, like with Carrot, it counts all the periods.
The new column F finds out how many periods since there was no code (a blank). If there is currently no code (blank), the answer is zero. If there has never been a code, like with Carrot, it counts all the periods.
I've uploaded the revised workbook.
Thanks for the help.
Bookmarks