Try
Code:
EndValue = ((Count - 1) // 6) * 42
Is that what you want?

/Henrik.