let's say i have this set of numbers

105 120 276 <--120 shows up here

212 350 274

140 370 286

310 336 276

250 331 296

270 120 376 <--120 shows up here

280 310 216

289 120 215 <--120 shows up here

280 330 216

299 250 212

3 columns wide (fixed), and x rows deep (varies), in this case 10

i am trying to find the quickest way possible to get the result, avoiding fill down formula. maybe a single cell formula can do this? a macro?

find:

1) the last time any given number appeared (the bottom number being the very last appearance), for example, '120' shows up three rows ago

2) the longest stretch of rows the number fails to appear; for example, the '120's last time to appear was 3 rows up. the time before that 2 rows between appearances, before that 5. so looking at the data the longest stretch of '120' not appearing was 5 rows.

3) the number of times any particular number might appear in any particluar number of 'rolling' rows. for example the number to target will be 276, and the 'rolling' number of rows will be set to 4

i have been doing it the long way im sure. there has to be a better way. any thoughts are very appreciated!

tx