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 - Show more from this author
*COMMENT Visual Realisation

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.

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.