Aside: Bob, just to add one more extension to the problem, last one for this case
(this is just for my knowledge).
I have now added a column D. All that needs to be checked now is that if [FieldB] takes values 8035-8040, [fieldC] should cycle from 0-130 (which your formula already does), and [fieldD] should simply take the values 130 rows above it.
That is for [fieldC ranging from 0-130 for [field] B being 8035-8040, [fieldD], is simply a copy of the [fieldD] values when fieldB equals
8034. Basically the 8034 values copied down 6 times.
I know it sounds complicated, but I have highlighted the relevant portions to check for [State1] in the attached workbook.
If you could please help with this, I would appreciate it.