NumberList ( start ; end ; increment )
Rate this function: Average rating: 3.7 (9 votes) Discuss this Custom Function
Gordon Kilgour, n/a
n/a
Returns a list of numbers from 'start' to 'end', incremented by 'increment'
Sample Input:
| NumberList ( 2 ; 5 ; 0.5 ) |
|
Sample Output:
|
Description:
Returns a carriage-return separated list of the numbers from 'start' to 'end' inclusive, incremented by the 'increment' value. Good for a Pop-up Menu or Drop-down List to limit user entry to specific values.
For example, for all even numbers from 2 to 8,
NumberList ( 2 ; 8 ; 2 ) would return:-
2
4
6
8
For all tens from 50 to 100,
NumberList ( 50 ; 100 ; 10 ) would return:-
50
60
70
80
90
100
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:
|
Newest Custom Functions:
| 1. |
CountWordOccurrences ( text ; searchWord ) |
| |
(Tue, Feb 07, 11:15am) |
| 2. |
indonesian_date(date) |
| |
(Mon, Feb 06, 7:14pm) |
| 3. |
phpArrayValue ( array ; key ; pos ) |
| |
(Fri, Jan 27, 1:49pm) |
| 4. |
solfm_timeToMinutes (theTime;roundSec) |
| |
(Fri, Jan 20, 6:26am) |
| 5. |
filterLines(filterField;filterValue;Result) |
| |
(Sat, Jan 14, 2:20pm) |
| 6. |
getMaxValue ( theList ) |
| |
(Thu, Jan 12, 1:06pm) |
| 7. |
MiddleWordsIncPunct ( text ; startingWord ; numberOfWords ) |
| |
(Sat, Jan 07, 9:16am) |
| 8. |
WindowInfo |
| |
(Fri, Jan 06, 12:39pm) |
 |
|
Doesn't work if you want to count backwards (decrement), but if you *only* want to count backwards, you can change "start < end" to "start > end" and "start + increment" to "start - increment" -- then NumberList ( 3 ; -2 ; 1 ) will yield:
3
2
1
0
-1
-2
Marc Wood, Minneapolis MN
September 21, 2010 11:06pm