Re: Coverting Alphabets into Numbers
- From: Dave Miller <david2.miller@xxxxxxxxxxxxx>
- Date: 24 May 2007 11:03:34 -0700
-Paste this code into a module
-Type, "BFDJ", into cell "A1"
-Type, =Decode("A1"), in cell "A2"
-Cell "A2" will return 2640
Regards,
Dave
Public Function DeCode(r As Variant) As Long
Dim i As Integer, _
l As String
For i = 1 To Len(r)
l = l & GetValue(Mid(r, i, 1))
Next
DeCode = l
End Function
Private Function GetValue(s As String) As String
Select Case s
Case Is < "J"
GetValue = Asc(s) - 64
Case "J"
GetValue = "0"
End Select
End Function
.
- Prev by Date: RE: Is it possible to hide and show buttons?
- Next by Date: Re: Programming question - VB, VBA, C#, C++
- Previous by thread: Re: Run Access Macro with Excel Macro
- Next by thread: Re: Coverting Alphabets into Numbers
- Index(es):