How do I create a sequence calculation in Excel

How do I create a sequence calculation in Excel

I need to start Cell A1 with S01AA1 and increment AA by 3 numbers and then jump to S01AB1

S01 ends in AM3
S02 ends in AK3
S03 ends in AH4
so every S0 is different, so I need a place to also put that restriction.

Also I cant use any letters like I or O.

So the sequence I need is like this:

S01AA1
S01AA2
S01AA3
S01AB1
S01AB2
S01AB3
S01AC1
S01AC2
...
S01AM3

In cell A1...  ="S01"&ADDRESS(IF(MOD(ROW(),3)=0,3,MOD(ROW(),3)),27+INT((ROW()-1)/3),4)
That will use I & O, but just delete those cells and move the cells below up.
'---
Jim Cone
Portland, Oregon USA
Display Permutations add-in (free)
(15 other programs also available for download)

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright