Alpha2Int ( Alpha )
Converts Alpha string to its integral equivalent
Average rating: 4.3 (32 votes) Log in to vote
JT Hughes Queuedom http://notapplicable.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
// SAMPLE CONVERSION FOR Alpha = "ABC"
// FIRST ITERATION
// Alpha = "ABC"
// Integer => Position ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; "A" ; 0 ; 1 ) * 26 ^ ( 3 - 1 ) = 1 * 26 ^ 2 = 676
// SECOND ITERATION
// Alpha => "BC"
// Integer +=> Position ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; "B" ; 0 ; 1 ) * 26 ^ ( 2 - 1 ) = 2 * 26 ^ 1 = 52
// THIRD ITERATION
// Alpha = "C"
// Integer +=> Position ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; "C" ; 0 ; 1 ) * 26 ^ ( 1 - 1 ) = 3 * 26 ^ 0 = 3
// Integer = 676 + 52 + 3 = 731
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.