+ Reply to Thread
Results 1 to 2 of 2

Creating Alphanumeric Sequences

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    2

    Creating Alphanumeric Sequences

    Hello,

    We are currently trying to run a test of one program by trying to replicate the alphanumeric sequence in Excel. The program itself prints out 5200 labels but it uses an alphanumeric sequence to produce those labels. I'm not 100% sure on the sequence (so this might be an issue) but I'm 90% sure it goes 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,/,.,(SPACE),%

    Here's my dilemma, I have the first and last label in the series, we just need the rest of them.

    First label: MP000EG4UP
    Last label: MP000EK599

    Any thoughts on a formula that might do this? Thanks!

  2. #2
    Registered User
    Join Date
    01-16-2013
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Creating Alphanumeric Sequences

    I found this macro to put in but I dont know how to convert it into my own sequence without it going bananas.

    Function DblToBase(ByVal d As Double, _
    iBase As Long, _
    Optional iLen As Long = 0) As String
    ' shg 2007-0807
    ' Returns the string conversion of positive Double d to the specified iBase (2..36)
    Const s As String = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
    Static sSym As Variant

    If IsEmpty(sSym) Then sSym = Split(s, ",")

    If iBase < 2 Or iBase > 36 Then
    DblToBase = "Invalid base!"
    ElseIf d < 0 Or d > 1E+15 Then
    DblToBase = "Invalid number!"
    Else
    Do
    DblToBase = sSym(d - Int(d / iBase) * iBase) & DblToBase
    d = Int(d / iBase)
    Loop While d

    If Len(DblToBase) < iLen Then
    DblToBase = String(iLen - Len(DblToBase), "0") & DblToBase
    End If
    End If
    End Function

    Also, my updated sequence should now be this:
    0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,.,(space),$,/,+,%

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1