I have a number matrix and want to calculate how many times one number appears 2 rows down from another in all columns. E.g. In the first column 46 appears once 2 rows down from 79 and again in column 4. Sometimes I may need to change it to 4 rows down. Thanks for you help.
79 | 109 | 23 | 98 |
72 | 70 | 63 | 23 |
46 | 48 | 71 | 40 |
120 | 99 | 81 | 79 |
51 | 88 | 101 | 76 |
75 | 76 | 5 | 46 |
39 | 34 | 31 | 46 |
110 | 62 | 82 | 98 |
51 | 140 | 71 | 95 |
41 | 92 | 90 | 87 |