Brian Dunning's FileMaker Custom Functions

Int2Alpha ( Integer )

Converts an integer to its alphabetic equivalent

  Average rating: 3.9 (38 votes) Log in to vote

JT Hughes   JT Hughes
Queuedom
http://notapplicable.com

Share on Facebook Share on Twitter

  Sample input:
Reverse ( Int2Alpha ( 745 ) )
  Sample output:
ABQ

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

// SAMPLE CONVERSION FOR Integer = 1234

// FIRST ITERATION

// Letter = Mod ( 1234 - 1 ; 26 ) + 1 = 12 -> "L"
// Integer => Div ( 1234 - 1 ; 26 ) = 47

// SECOND ITERATION

// Letter &=> Mod ( 47 - 1 ; 26 ) + 1 = 21 -> "U"
// Integer => Div ( 47 - 1 ; 26 ) = 1

// THIRD ITERATION

// Letter &=> Mod ( 1 - 1 ; 26 ) + 1 = 1 -> "A"
// Integer => Div ( 1 - 1 ; 26 ) = 0

// Letters = "LUA"
// Reverse( "LUA" ) => "AUL"

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.