Let's say there are 10 cells in a row...
Apple, Apple, Banana, Banana, Banana, Apple, Orange, Orange, Orange, Orange
In the next row, you want to automatically calculate the number of *contiguous* cells that match the cell above, a formula which should produce...
2, 2, 3, 3, 3, 1, 4, 4, 4, 4
Note that this would be different than calculating the total number of cells in the row that match the cell above. For example, even though "Apple" appears three times in total, in the first contiguous block of "Apple", it appears twice, and in the second contiguous block of "Apple", it only appears once.
What would be the best formula to accomplish this?a
Apple, Apple, Banana, Banana, Banana, Apple, Orange, Orange, Orange, Orange
In the next row, you want to automatically calculate the number of *contiguous* cells that match the cell above, a formula which should produce...
2, 2, 3, 3, 3, 1, 4, 4, 4, 4
Note that this would be different than calculating the total number of cells in the row that match the cell above. For example, even though "Apple" appears three times in total, in the first contiguous block of "Apple", it appears twice, and in the second contiguous block of "Apple", it only appears once.
What would be the best formula to accomplish this?a