I'm generating some math practice problems (addition, subtraction, etc.) and would like to minimize having the same problem show up next to itself, or even a few cells away. Any suggestions on using Excel to calculate the distance (in cells) from this cell, to the nearest cell (up or down) with the same formula in it? Something like this:
1 + 2 (5)
3 + 4 (3)
5 + 6 (1)
5 + 6 (1)
3 + 4 (3)
1 + 2 (5)

I actually have a column with the problems in it, and an adjacent column with the problems reversed (1+2, 2+1) so ideally I'd like to search up or down in my column, and in the adjacent column, but I can make it work with just up/down in my own column.

Thanks for any help-