It looks like the goal is to simply count how many consecutive times n appears in Tab#. You also seem to prefer a macro, but I wonder why. Here's how I would do it with a simple worksheet formula:
In M2 enter 1
In M3 enter =IF(L3=L2,M2+1,1) and copy down as far as needed.
If I decided that I really preferred VBA, then it would be the same thing but in a VBA loop. (pseudocode)
Personally I prefer the spreadsheet function programming language for something like this, but the VBA language works fine, too.
Bookmarks