Brian Dunning's FileMaker Custom Functions

DecToAlpha ( decimal )

Returns the representation of a decimal number as a variable-length alphabetic text string.

  Average rating: 4.2 (45 votes) Log in to vote

Michael Horak   Michael Horak
*COMMENT Visual Realisation
http://comment.cjb.net

Share on Facebook Share on Twitter

  Sample input:
0
1
2

25
26
27

51
52
53

701
702
703

18277
18278
18279

etc.
  Sample output:
A
B
C

Z
AA
AB

AZ
BA
BB

ZZ
AAA
AAB

ZZZ
AAAA
AAAB

etc.

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

Returns the representation of a decimal (base-10) number as a variable-length alphabetic text string, similar to the column headings in Excel: A, B, C ... Z, AA, AB ... AZ, BA, BB ... ZZ, AAA, AAB ... ZZZ, AAAA, AAAB, etc.

NOTE:
DecToAlpha expects numbers to start at 0 (zero). In other words, DecToAlpha (0) returns "A", while DecToAlpha (1) returns "B". If your numbers start at 1, and you want the number 1 to be represented as "A", use DecToAlpha (decimal - 1).

 

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.

Under construction. Email me your wish list for improvements.