Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

NumberRange_Explode ( numberRangeText )

Rate this function:  

  Average rating: 4.4  (30 votes)
  Discuss this Custom Function

Jonathan Mickelson, Thought Development Corp.

Receives a string of numbers separated by commas, hyphens, or any multiple or combination or both, and returns a return delimited list of all whole numbers within the input ranges

Sample Input:
NumberRange_Explode ( "1-3,5,7-10" )
Sample Output:

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


This takes a number string either as commas (1,5,8) or a hyphen (2-11), or any combination of the two (2,7,10-14,21,50-62,72), and returns a return delimited list of all whole numbers included within the given ranges.

This is very useful in building multi-line keys for relationships, or in conjunction with other methods, such as substitute lists or the awesome CustomList ( ) function.

NOTE: hyphenated ranges can be given in any order (2-5 or 5-2), results are ordered from smallest number to largest, regardless or original order.


- NumberRange_Explode ( "1-3" ) = "1¶2¶3"
- NumberRange_Explode ( "2,4,8,11" ) = "2¶4¶8¶11"
- NumberRange_Explode ( "1-3,5,7-10" ) = "1¶2¶3¶5¶7¶8¶9¶10"
- NumberRange_Explode ( "20-16" ) = "16¶17¶18¶19¶20"

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

This is my Custom Function and I want to edit it



I'm very excited to see this, I've been struggling to find this function for awaile. Unfortunately I'm a bit of a newbie so I'm not able to get it to work. Would it be possible to post a demo?


Adam, Melbojrne
February 06, 2013 8:51pm

Hi Adam,

I've tried re-pasting the text form a working version, just in case something was wrong in the previous pasted version. This works and is in production for me.

This is a recursive function, so it must be made into a Custom Function to work, since it must call itself until it is finished.

I'm not sure what part is tripping it up for you, but here's a brief step by step:

- Open FileMaker Pro Advanced, to add a new Custom Function.
- Copy and paste the text within the calc window above into it.
- Edit the Function name and parameters to match the Comment at the top of the calc text.

When you close the dialog it should validate the calc, and close correctly. You may now use the function. I'd suggest opening the Data Viewer, and pasting the following into the calc to test it:

NumberRange_Explode ( "1-3,5,7-10" ) = "1¶2¶3¶5¶7¶8¶9¶10"

You should see the result in the results area below and it will look like this:


Hope that helps!! Enjoy!

Jonathan Mickelson, Los Angeles, CA
February 07, 2013 9:54am


I'm looking for something that does the opposite of this -- where the input would be a list of numbers and the output would be a number range as text.

So something like:
NumberRange_Create ( "1¶2¶3¶5¶7¶8¶9¶10" ) = "1-3, 5, 7-10"

I've attempted to wrap my mind around building this with a custom function but it's beyond my training. Any ideas?

Many thanks

August 24, 2016 4:19pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 3 + 6 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. ChiSquare3x2 ( param ; param ; param ; param )
  (Tue, Aug 14, 6:33am)
2. ReverseByteOrder ( bytes )
  (Thu, Aug 09, 12:06pm)
3. BytesToDec ( hex )
  (Thu, Aug 09, 11:47am)
4. GetAsHexBytes ( number ; bytes )
  (Thu, Aug 09, 10:50am)
5. ValCorrelationCoeff ( XValueList; YValueList; Xmean; Ymean; XStdDev; YStdDev )
  (Wed, Aug 08, 4:17pm)
6. ValLeastSquaresSlope ( XValueList; YValueList; Xmean; Ymean )
  (Wed, Aug 08, 4:10pm)
7. ValueMath ( List1 ; List2 ; operation )
  (Wed, Aug 08, 4:05pm)
8. GetExtension ( File )
  (Tue, Aug 07, 10:22am)

RSS Feed of Custom Functions