FPSpreadsheet: List of formulas: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: FPSpreadsheet: List of formulas
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ## Introduction | |
| 2 | + | ||
| 3 | + | This is a list of the formulas supported by [[FPSpreadsheet]]. | |
| 4 | + | ||
| 5 | + | The arguments can be **constants** of the given type, or **cells** containing values of the given type. Similar to the Office applications, type-checking is very relaxed, and data are automatically converted to the required type if possible. | |
| 6 | + | ||
| 7 | + | ## Mathematical functions | |
| 8 | + | ||
| 9 | + | <thead> | |
| 10 | + | ||
| 11 | + | </thead> | |
| 12 | + | <tbody> | |
| 13 | + | ||
| 14 | + | <code>base</code>, if omitted, is 10.</td> | |
| 15 | + | ||
| 16 | + | </tbody> | |
| 17 | + | ||
| 18 | + | ## Statistical functions | |
| 19 | + | ||
| 20 | + | <thead> | |
| 21 | + | ||
| 22 | + | </thead> | |
| 23 | + | <tbody> | |
| 24 | + | ||
| 25 | + | <code>condition</code> is value, string or cell</td> | |
| 26 | + | ||
| 27 | + | sfExcel5<br /> | |
| 28 | + | sfExcel8</td> | |
| 29 | + | ||
| 30 | + | (like <code>A1:D5</code>)</td> | |
| 31 | + | ||
| 32 | + | <code>condition</code> is value, string or cell</td> | |
| 33 | + | ||
| 34 | + | <code>condition</code> is value, string or cell</td> | |
| 35 | + | ||
| 36 | + | </tbody> | |
| 37 | + | ||
| 38 | + | ## Date/time funtions | |
| 39 | + | ||
| 40 | + | <thead> | |
| 41 | + | ||
| 42 | + | </thead> | |
| 43 | + | <tbody> | |
| 44 | + | ||
| 45 | + | <code>interval</code> is a string:<br /> | |
| 46 | + | <code>Y</code> = number of years,<br /> | |
| 47 | + | <code>M</code> = number of months,<br /> | |
| 48 | + | <code>D</code> = number of days</td> | |
| 49 | + | ||
| 50 | + | Will refresh whenever the worksheet recalculates.</td> | |
| 51 | + | ||
| 52 | + | <code>type=0</code>: Sunday=1, Saturday=7 (default)<br /> | |
| 53 | + | <code>type=1</code>: Monday=1, Sunday=7<br /> | |
| 54 | + | <code>type=2</code>: Monday=9, Sunday=6</td> | |
| 55 | + | ||
| 56 | + | </tbody> | |
| 57 | + | ||
| 58 | + | ## String functions | |
| 59 | + | ||
| 60 | + | <thead> | |
| 61 | + | ||
| 62 | + | </thead> | |
| 63 | + | <tbody> | |
| 64 | + | ||
| 65 | + | <code>count</code>: integer (default 1)</td> | |
| 66 | + | ||
| 67 | + | <code>start_pos, count</code>: integer</td> | |
| 68 | + | ||
| 69 | + | <code>start_pos, count</code>: integer<br /> | |
| 70 | + | <code>new_text</code>: string</td> | |
| 71 | + | ||
| 72 | + | <code>count</code>: integer<br /> | |
| 73 | + | ||
| 74 | + | <code>count</code>: integer (default 1)</td> | |
| 75 | + | ||
| 76 | + | <code>nth_appearance</code>: integer<br /> | |
| 77 | + | (default: replace all)</td> | |
| 78 | + | ||
| 79 | + | </tbody> | |
| 80 | + | ||
| 81 | + | ## Logical functions | |
| 82 | + | ||
| 83 | + | <thead> | |
| 84 | + | ||
| 85 | + | </thead> | |
| 86 | + | <tbody> | |
| 87 | + | ||
| 88 | + | or <code>value_false</code> (or false) if <code>condition</code> is false</td> | |
| 89 | + | ||
| 90 | + | <code>value_true, value_false</code>: any type</td> | |
| 91 | + | ||
| 92 | + | </tbody> | |
| 93 | + | ||
| 94 | + | ## Info functions | |
| 95 | + | ||
| 96 | + | | Calling prototye | Meaning | Argument types | Arguments | Result type | Not for | | |
| 97 | + | |----|----|----|----|----|----| | |
| 98 | + | | `ERROR.TYPE(value)` | Returns the numeric representation of one of the errors in Excel (1 = \#NULL!, 2 = \#DIV/0!, 3 = \#VALUE!, 4 = \#REF!, 5 = \#NAME?, 6 = \#NUM!, \#N/A else). | cell | 1 | integer | sfExcel2 | | |
| 99 | + | | `ISBLANK(value)` | Checks for blank or null values. | any, usually cell | 1 | boolean | | | |
| 100 | + | | `ISERR(value)` | Returns TRUE if `value` is an error but not \#N/A | any, usually cell | 1 | boolean | | | |
| 101 | + | | `ISERROR(value)` | Returns TRUE if `value` is an error value (#N/A, \#VALUE!, \#REF!, \#DIV/0!, \#NUM!, \#NAME? or \#NULL). | any, usually cell | 1 | boolean | | | |
| 102 | + | | `ISLOGICAL(value)` | Returns TRUE if `value` is boolean | any, usually cell | 1 | boolean | | | |
| 103 | + | | `ISNA(value)` | Returns TRUE if `value` is a \#N/A error | any, usually cell | 1 | boolean | | | |
| 104 | + | | `ISNONTEXT(value)` | Returns TRUE if `value` is not a string | any, usually cell | 1 | boolean | | | |
| 105 | + | | `ISNUMBER(value)` | Returns TRUE if `value` is a number | any, usually cell | 1 | boolean | | | |
| 106 | + | | `ISREF(value)` | Returns TRUE if `value` is a cell reference | any, usually cell | 1 | boolean | | | |
| 107 | + | | `ISTEXT(value)` | Returns TRUE if `value` is a string | any, usually cell | 1 | boolean | | | |
| 108 | + | | | | | | | | | |
| 109 | + | | | | | | | | | |
| 110 | + | ||
| 111 | + | ## Lookup/reference functions | |
| 112 | + | ||
| 113 | + | <thead> | |
| 114 | + | ||
| 115 | + | </thead> | |
| 116 | + | <tbody> | |
| 117 | + | ||
| 118 | + | <code>ref_type</code> is the type of reference to use: 1=absolute (default); 2=relative column, absolute row; 3=absolute column, relative row; 4=relative<br /> | |
| 119 | + | <code>ref_style</code> if true (default) means: address in A1 dialect, otherwise in R1C1<br /> | |
| 120 | + | <code>sheet_name=name</code> of the worksheet</td> | |
| 121 | + | ||
| 122 | + | boolean<br /> | |
| 123 | + | string</td> | |
| 124 | + | ||
| 125 | + | <code>reference</code> is a reference to a cell or range of cells. If omitted, it is assumed that the reference is the cell address in which the COLUMN function has been entered.</td> | |
| 126 | + | ||
| 127 | + | type = 1 (default) finds the largest value <= <code>value</code> (assumes an array in ascending order)<br /> | |
| 128 | + | type = -1 finds the smallest value >= <code>value</code> (assumes an array in descending order)<br /> | |
| 129 | + | type = 0 finds the first value equal to <code>value</code> (no requirement on sort order, array can contain strings with wildcard '?').</td> | |
| 130 | + | ||
| 131 | + | <code>array</code>: 1-D cell range (e.g., <code>A1:A9</code>, or <code>A1:G1</code>)<br /> | |
| 132 | + | <code>type</code>: integer</td> | |
| 133 | + | ||
| 134 | + | <code>reference</code> is a reference to a cell or range of cells. If omitted, it is assumed that the reference is the cell address in which the ROW function has been entered.</td> | |
| 135 | + | ||
| 136 | + | </tbody> | |
| 137 | + | ||
| 138 | + | --- | |
| 139 | + | *From the Free Pascal wiki, page "FPSpreadsheet: List of formulas", as it stood on 2020-11-10 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
