Right so I had to make a couple of tweaks because the length of varCounter may be 5 or 6 characters depending on the letters e.g. JJ27 would be 101027. This is my adapted code where varNewJob replaces varCounter and varLength is Len(varNewJob):
Switch(varLength, 4,
With(
{
_base: Split(varNewJob,"")
},
Char(64 + Index(_base,1).Result) &
Char(64 + Index(_base,2).Result) &
Index(_base,3).Result &
Index(_base,4).Result
), 5,
With({_base: varNewJob} ,
Char(64 + Left(_base, 1)) &
Char(64 + Mid(_base, 2, 2)) &
Right(_base, 2)
),
6,
With({_base: varNewJob} ,
Char(64 + Left(_base, 2)) &
Char(64 + Mid(_base, 3, 2)) &
Right(_base, 2)
)
)
Also to skip to '01' from '99' I used this code:
If(Right(varConvertedJob, 2) = "99", Set(varNewJob, varConvertedJob +2), Set(varNewJob, varConvertedJob +1))
Seems to be working well. Thanks again @rubin_boer .