Could be done with a little legwork with equations. Code might be better. Question: are the numbers in a row always in sequential order? i.e.
1, 2, 3, 4, 5, ...
but not
1, 5, 3, 2, 4, ...
If so,
=if(or(and(a2=a1+1,a3=a2+1,a4=a3+1,a5=a4+1,a6=a5+1 ,a7=a6+1),(same thing comparing cells a2-a8),(so on and so forth),(same thing comparing a19-a25),"x","").
Then all you have to do is sort by those results and clear any rows that has an "x" for this result. I'm not sure if Excel limits on formula size will be a problem. I see a limit of 1024 characters per cell so if that applies to formulas, you should be ok. ***
Anyhoo, same sort of thing with your other rules. If the above equation works, you should be able to figure it out from here. If not, let me know.
*** I think some equations have some quirky limits to like a Sum equation can't have more than 30 commas). You should be ok. I actually just tested that and it seems like that is no longer an issue.
|