Forum Discussion

nickjrusso12's avatar
nickjrusso12
Copper Contributor
Jul 20, 2024
Solved

Sequencing with Duplicate Numbers and Alternating Text

I'm creating sequences with a static numbered prefix, 2 repeated numbers that must sequence with an alternating A/B pattern and cannot figure out the proper coding for it. Any help would be appreciated.

 

19-001A

19-001B,

19-002A

19-002B

19-003A

19-003B

  • nickjrusso12 With a modern version of Excel, you could try either of the following:

     

    =TOCOL(19&TEXT(SEQUENCE(999),"-000")&{"A","B"})

     

    -OR-

     

    =TOCOL(TEXT(SEQUENCE(999,,19001),"00-000")&{"A","B"})

     

    If {"A","B"} doesn't work out for you, try using HSTACK("A","B") instead.

  • djclements's avatar
    djclements
    Bronze Contributor

    nickjrusso12 With a modern version of Excel, you could try either of the following:

     

    =TOCOL(19&TEXT(SEQUENCE(999),"-000")&{"A","B"})

     

    -OR-

     

    =TOCOL(TEXT(SEQUENCE(999,,19001),"00-000")&{"A","B"})

     

    If {"A","B"} doesn't work out for you, try using HSTACK("A","B") instead.

Resources