From 94f7c06d8b9796bfbbfdbc31598919610a8438ed Mon Sep 17 00:00:00 2001 From: ushasundarajan Date: Wed, 28 Aug 2024 17:19:36 +0530 Subject: [PATCH 1/5] Added newly implemented volume 3 release formulae --- .../Supported-Formulas/Financial-Formulas.md | 356 +++++++ .../Supported-Formulas/Math-Trigonometry.md | 471 +++++++++ .../Supported-Formulas/Text-Formulas.md | 992 ++++++++++++++++++ .../Supported-Formulas/statistical.md | 89 ++ 4 files changed, 1908 insertions(+) diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md index 846d0c885..e8c402f3e 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md @@ -744,3 +744,359 @@ _INTRATE(settlement, maturity, investment, redemption, [basis])_ * Redemption :The amount to be received at maturity. * Basis : The type of specifies the day count basis to used in the calculation. + + + +## NOMINAL + +the function `NOMINAL` returns the nominal annual interest rate, given the effective rate and the number of compounding periods per year. + +**Syntax:** + +_NOMINAL(effect_rate, npery)_ + +**Where:** + +* effect_rate: The effective interest rate. + +* npery: The number of compounding periods per year. + +**Remarks:** + +* Npery is truncated to an integer. + +* If either argument is nonnumeric, `NOMINAL` returns the `#VALUE!` error value. + +* If effect_rate ≤ 0 or if npery < 1, `NOMINAL` returns the `#NUM!` error value. + +* `NOMINAL` is related to `EFFECT` function. The relationship between `NOMINAL` and `EFFECT` is shown in the following equation: + + `effective_rate = (1 + (nominal_rate / npery))^npery - 1` + + + +## MDURATION + +The function `MDURATION` returns the modified Macauley duration for a security with an assumed par value of $100. + +**Syntax:** + +_MDURATION(settlement, maturity, coupon, yld, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* coupon: The security's annual coupon rate. + +* yld: The security's annual yield. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not valid, `MDURATION` returns `#VALUE!`. + +* If yld < 0 or coupon < 0, it returns `#NUM!`. If frequency is not 1, 2, or 4, it returns `#NUM!`. + +* If basis is outside the range 0-4, it returns `#NUM!`. + +* If settlement is greater than or equal to maturity, it returns `#NUM!`. + +* Equation to calculate `MDURATION` is `Modified Duration = Macauley Duration / (1 + (yld / frequency))`. + + + +## PDURATION + +The function `PDURATION` returns the number of periods required by an investment to reach a specified value. + +**Syntax:** + +_PDURATION(rate, pv, fv)_ + +**Where:** + +* rate: The interest rate per period. + +* pv: The present value of the investment. + +* fv: The desired future value of the investment. + +**Remarks:** + +* If rate is less than or equal to 0, or if pv or fv is less than or equal to 0, `PDURATION` returns the `#NUM!` error value. + +* If any argument is nonnumeric, `PDURATION` returns the `#VALUE!` error value. + +* The `PDURATION` function calculates the number of periods required using the following equation: + + `PDURATION = LOG(fv / pv) / LOG(1 + rate)` + + + +## COUPDAYS + +The function `COUPDAYS` returns the number of days in the coupon period that contains the settlement date. + +**Syntax:** + +_COUPDAYS(settlement, maturity, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not a valid date, `COUPDAYS` returns `#VALUE!`. + +* If frequency is any number other than 1, 2, or 4, `COUPDAYS` returns `#NUM!`. + +* If basis is outside the range 0-4, `COUPDAYS` returns `#NUM!`. + +* If settlement is greater than or equal to maturity, `COUPDAYS` returns `#NUM!`. + + + +## COUPDAYBS + +The function `COUPDAYBS` returns the number of days from the beginning of a coupon period until its settlement date. + +**Syntax:** + +_COUPDAYBS(settlement, maturity, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not valid, `COUPDAYBS` returns `#VALUE!`. + +* If frequency is any number other than 1, 2, or 4, `COUPDAYBS` returns `#NUM!`. + +* If basis is outside the range 0-4, it returns `#NUM!`. + +* If settlement is greater than or equal to maturity, it returns `#NUM!`. + + + +## COUPDAYSNC + +The function `COUPDAYSNC` returns the number of days from the settlement date to the next coupon date. + +**Syntax:** + +_COUPDAYSNC(settlement, maturity, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not valid, `COUPDAYSNC` returns `#VALUE!`. + +* If frequency is any number other than 1, 2, or 4, `COUPDAYSNC` returns `#NUM!`. + +* If basis is outside the range 0-4, it returns `#NUM!`. + +* If settlement is greater than or equal to maturity, it returns `#NUM!`. + + + +## COUPPCD + +The function `COUPPCD` returns a number that represents the previous coupon date before the settlement date. + +**Syntax:** + +_COUPPCD(settlement, maturity, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not valid, `COUPPCD` returns `#VALUE!`. + +* If frequency is any number other than 1, 2, or 4, `COUPPCD` returns `#NUM!`. + +* If basis is outside the range 0-4, it returns `#NUM!`. + +* If settlement is greater than or equal to maturity, it returns `#NUM!`. + + + +## COUPNCD + +The function `COUPNCD` returns a number that represents the next coupon date after the settlement date. + +**Syntax:** + +_COUPNCD(settlement, maturity, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not valid, `COUPNCD` returns `#VALUE!`. + +* If frequency is any number other than 1, 2, or 4, `COUPNCD` returns `#NUM!`. + +* If basis is outside the range 0-4, it returns `#NUM!`. + +* If settlement is greater than or equal to maturity, it returns `#NUM!`. + + + +## COUPNUM + +The function `COUPNUM` returns the number of coupons payable between the settlement date and maturity date, rounded up to the nearest whole coupon. + +**Syntax:** + +_COUPNUM(settlement, maturity, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. + +* maturity: The security's maturity date. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. + +* If settlement or maturity is not valid, `COUPNUM` returns `#VALUE!`. + +* If frequency is any number other than 1, 2, or 4, `COUPNUM` returns `#NUM!`. + +* If basis is outside the range 0-4, `COUPNUM` returns `#NUM!`. + +* If settlement is greater than or equal to maturity, `COUPNUM` returns `#NUM!`. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md index 8e16bf35c..ff57e60b5 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md @@ -2533,3 +2533,474 @@ _SERIESSUM(x, n, m, coefficients)_ * The argument is non-numeric, it returns the `#VALUE!` error message. + + + +## XLOOKUP + + +The `XLOOKUP` function allows you to find and return a corresponding value from a table or range based on a search term. + + + +For example, you can look up the price of an automotive part by its part number, or find an employee's name based on their employee ID. + + + +With `XLOOKUP`, you can search for a value in one column and return a value from another column in the same row, regardless of which side the return column is on. + + + +**Syntax:** + + + +_XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])_ + + + +**where:** + + + +* lookup_value: The value to search for. If omitted, `XLOOKUP` returns blank cells it finds in lookup_array. + + + +* lookup_array: The array or range to search. + + + +* return_array: The array or range to return. + + + +* [if_not_found] (Optional): Where a valid match is not found, return the [if_not_found] text you supply. If a valid match is not found, and [if_not_found] is missing, `#N/A` is returned. + + + +* [match_mode] (Optional): Specify the match type: + + + + * 0 - Exact match. If none found, return `#N/A`. This is the default. + + + + * -1 - Exact match. If none found, return the next smaller item. + + + + * 1 - Exact match. If none found, return the next larger item. + + + + * 2 - A wildcard match where `*`, `?`, and `~` have special meaning. + + + +* [search_mode] (Optional): Specify the search mode to use: + + + + * 1 - Perform a search starting at the first item. This is the default. + + + + * -1 - Perform a reverse search starting at the last item. + + + + * 2 - Perform a binary search that relies on lookup_array being sorted in ascending order. If not sorted, invalid results will be returned. + + + + * -2 - Perform a binary search that relies on lookup_array being sorted in descending order. If not sorted, invalid results will be returned. + + + +**Remarks:** + + + +* `XLOOKUP` provides a more versatile alternative to older functions like `VLOOKUP`, `HLOOKUP`, and `LOOKUP`. + + + +* The function can search both vertically and horizontally across your data, allowing for more flexible data retrieval. + + + +* If no match is found and [if_not_found] is omitted, `XLOOKUP` will return a `#N/A` error. + + + +* Using [match_mode] allows you to control whether the function looks for exact matches, approximate matches, or supports wildcard characters. + + + +* The [search_mode] argument lets you control the order in which the search is performed, which can be useful for optimizing performance on large datasets. + + + +## XMATCH + + + +The `XMATCH` function returns the relative position of an item in an array or range of cells. + + + +**Syntax:** + + + +_XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])_ + + + +**where:** + + + +* lookup_value: The lookup value. + + + +* lookup_array: The array or range to search. + + + +* [match_mode] (Optional): Specify the match type: + + + + * 0 - Exact match (default). + + + + * -1 - Exact match or next smallest item. + + + + * 1 - Exact match or next largest item. + + + + * 2 - A wildcard match where `*`, `?`, and `~` have special meaning. + + + +* [search_mode] (Optional): Specify the search type: + + + + * 1 - Search first-to-last (default). + + + + * -1 - Search last-to-first (reverse search). + + + + * 2 - Perform a binary search that relies on lookup_array being sorted in ascending order. + + + + If not sorted, invalid results will be returned. + + + + * -2 - Perform a binary search that relies on lookup_array being sorted in descending order. If not sorted, invalid results will be returned. + + + +## FLOOR.MATH + + + +The `FLOOR.MATH` function rounds a number down to the nearest integer or to the nearest multiple of significance. + + + +**Syntax:** + + + +_FLOOR.MATH(number, significance, mode)_ + + + +**where:** + + + +* number: The number to be rounded down. + + + +* significance (Optional): The multiple to which you want to round. + + + +* mode (Optional): The direction (toward or away from 0) to round negative numbers. + + + +**Remarks:** + + + +* By default, positive numbers with decimal portions are rounded down to the nearest integer. For example, 6.3 is rounded down to 6, using the default significance (1). + + + +* By default, negative numbers with decimal portions are rounded away from 0 to the nearest integer. For example, -6.7 is rounded to -7. + + + +* By using 0 or a negative number as the mode argument, you can change the direction of the rounding for negative numbers. For example, rounding -6.3 with a significance of 1 and a mode of -1 rounds toward 0, to -6. + + + +* The significance argument rounds the number down to the nearest integer that is a multiple of the significance specified. The exception is where the number to be rounded is an integer. For example, for a significance of 3, the number is rounded down to the next integer that is a multiple of 3. + + + +* If number divided by a significance of 2 or greater results in a remainder, the result is rounded down. + + + +## FLOOR.PRECISE + + +The `FLOOR.PRECISE` function returns a number that is rounded down to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded down. However, if the number or the significance is zero, zero is returned. + + + +**Syntax:** + + + +_FLOOR.PRECISE(number, [significance])_ + + + +**where:** + + + +* number: The value to be rounded. + + + +* significance (Optional): The multiple to which number is to be rounded. If omitted, the default value is 1. + + + +**Remarks:** + + + +* The absolute value of the multiple is used, so that the `FLOOR.PRECISE` function returns the mathematical floor irrespective of the signs of number and significance. + + + +## ISO.CEILING + + + +The `ISO.CEILING` function returns a number that is rounded up to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded up. However, if the number or the significance is zero, zero is returned. + + + +**Syntax:** + + + +_ISO.CEILING(number, [significance])_ + + + +**where:** + + + +* number: The value to be rounded. + + + +* significance (Optional): The optional multiple to which number is to be rounded. If omitted, the default value is 1. + + + +**Remarks:** + + + +* The absolute value of the multiple is used, so that the `ISO.CEILING` function returns the mathematical ceiling irrespective of the signs of number and significance. + + + +## CEILING.PRECISE + + +The function `CEILING.PRECISE` returns a number that is rounded up to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded up. However, if the number or the significance is zero, zero is returned. + + + +**Syntax:** + + + +_CEILING.PRECISE(number, [significance])_ + + + +**where:** + + + +* number: The value to be rounded. + + + +* significance (Optional): The multiple to which number is to be rounded. If omitted, the default value is 1. + + + +**Remarks:** + + +* The absolute value of the multiple is used, so that the `CEILING.PRECISE` function returns the mathematical ceiling irrespective of the signs of number and significance. + + + +## HSTACK + + + +The `HSTACK` function appends arrays horizontally and in sequence to return a larger array. + + + +**Syntax:** + + + +_HSTACK(array1, [array2], ...)_ + + + +**where:** + + + +* array: The arrays to append. + + + +**Remarks:** + + +* `HSTACK` returns the array formed by appending each of the array arguments in a column-wise fashion. The resulting array will have the following dimensions: + + + + * Rows: The maximum of the row count from each of the array arguments. + + + + * Columns: The combined count of all the columns from each of the array arguments. + + + +* If an array has fewer rows than the maximum width of the selected arrays. + + + +* `HSTACK` returns a `#N/A` error in the additional rows. Use `HSTACK` inside the `IFERROR` function to replace `#N/A` with the value of your choice. + + + +## VSTACK + + + +The function `VSTACK` Appends arrays vertically and in sequence to return a larger array. + + + +**Syntax:** + + + +_VSTACK(array1, [array2], ...)_ + + + +**where:** + + + +* array: The arrays to append. + + + +**Remarks:** + + + +* `VSTACK` returns the array formed by appending each of the array arguments in a row-wise fashion. The resulting array will have the following dimensions: + + + + * Rows: The combined count of all the rows from each of the array arguments. + + + + * Columns: The maximum of the column count from each of the array arguments. + + + +* If an array has fewer columns than the maximum width of the selected array. + + + +* `VSTACK` returns a `#N/A` error in the additional columns. Use `VSTACK` inside the `IFERROR` function to replace `#N/A` with the value of your choice. + + + +## PHI + + + +The function `PHi` returns the value of the density function for a standard normal distribution. + + + +**Syntax:** + + + +_PHIL(x)_ + + + +**where:** + + + +* x: The number for which you want the density of the standard normal distribution. + + + +**Remarks:** + + + +* If x is a numeric value that is not valid, `PHI` returns the `#NUM!` error value. + + + +* If x is using a data type that is not valid, such as a nonnumeric value, `PHI` returns the `#VALUE!` error value. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md index a3688807c..90167a54b 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md @@ -1120,3 +1120,995 @@ Remark: * The find text is not found it return `#VALUE!` error message. + + + +## UNIQUE + + + +The `UNIQUE` function returns a list of unique values from a list or range. + + + +**Syntax:** + + + +_UNIQUE(array, [by_col], [exactly_once])_ + + + +**where:** + + + +* array: The range or array from which to return unique rows or columns. + + + +* [by_col] (Optional): A logical value indicating how to compare. If `TRUE` compares columns against each other and returns unique columns.If `FALSE` (or omitted) compares rows against each other and returns unique rows. + + + +* [exactly_once] (Optional): A logical value that will return rows or columns that occur exactly once in the range or array.If `TRUE` returns all distinct rows or columns that occur exactly once.If `FALSE` (or omitted) returns all distinct rows or columns. + + + +**Remarks:** + + + +* An array can be thought of as a row or column of values, or a combination of rows and columns of values. + + + +* The `UNIQUE` function returns an array that will spill into the appropriate number of cells if it's the final result of a formula. + + + +## TEXTAFTER + + + +The `TEXTAFTER` function returns text that occurs after a given character or string. It is the opposite of the `TEXTBEFORE` function. + + + +**Syntax:** + + + +_TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])_ + + + +**where:** + + + +* text: The text you are searching within. Wildcard characters are not allowed. + + + +* delimiter: The text that marks the point after which you want to extract. + + + +* [instance_num] (Optional): The instance of the delimiter after which you want to extract the text. By default, instance_num = 1. A negative number starts searching text from the end. + + + +* [match_mode] (Optional): Determines whether the text search is case-sensitive. The default is case-sensitive. If 0 - Case-sensitive, if 1 - Case-insensitive. + + + +* [match_end]: Optional. Treats the end of the text as a delimiter. By default, the text is an exact match. If 0 - Don't match the delimiter against the end of the text, if 1 - Match the delimiter against the end of the text. + + + +* [if_not_found] (Optional): The value returned if no match is found. By default, `#N/A` is returned. + + + +**Remarks:** + + + +* When searching with an empty delimiter value, `TEXTAFTER` matches immediately. It returns the entire text when searching from the front (if instance_num is positive) and empty text when searching from the end (if instance_num is negative). + + + +* `TEXTAFTER` returns a `#N/A` error if the delimiter isn't contained in text. + + + +* `TEXTAFTER` returns a `#VALUE!` error if instance_num = 0 or if instance_num is greater than the length of text. + + + +* `TEXTAFTER` returns a `#N/A` error if instance_num is greater than the number of occurrences of the delimiter. + + + + +## TEXTBEFORE + + + +The `TEXTBEFORE` function returns text that occurs before a given character or string. It is the opposite of the `TEXTAFTER` function. + + + +**Syntax:** + + + +_TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])_ + + + +**where:** + + + +* text: The text you are searching within. Wildcard characters are not allowed. If text is an empty string, `TEXTBEFORE` returns empty text. + + + +* delimiter: The text that marks the point before which you want to extract. + + + +* [instance_num] (Optional): The instance of the delimiter after which you want to extract the text. By default, instance_num = 1. A negative number starts searching text from the end. + + + +* [match_mode] (Optional): Determines whether the text search is case-sensitive. The default is case-sensitive. If 0 - Case-sensitive, if 1 - Case-insensitive. + + + +* [match_end] (Optional): Treats the end of the text as a delimiter. By default, the text is an exact match. If 0 - Don't match the delimiter against the end of the text, if 1 - Match the delimiter against the end of the text. + + + +* [if_not_found] (Optional): The value returned if no match is found. By default, #N/A is returned. + + + +**Remarks:** + + + +* When searching with an empty delimiter value, `TEXTBEFORE` matches immediately. It returns empty text when searching from the front (if instance_num is positive) and the entire text when searching from the end (if instance_num is negative). + + + +* `TEXTBEFORE` returns a `#VALUE!` error if instance_num = 0 or if instance_num is greater than the length of text. + + + +* `TEXTBEFORE` returns a `#N/A` error if the delimiter isn’t contained in text. + + + +* `TEXTBEFORE` returns a `#N/A` error if instance_num is greater than the number of occurrences of the delimiter in text. + + + +## VALUETOTEXT + + + +The `VALUETOTEXT` function returns text from any specified value. It passes text values unchanged and converts non-text values to text. + + + +**Syntax:** + + + +_VALUETOTEXT(value, [format])_ + + + +**where:** + + + +* value: The value to return as text. + + + +* [format] (Optional): The format of the returned data. It can be one of two values: + + + + * 0: Default. Concise format that is easy to read. The text returned will be the same as the text rendered in a cell that has general formatting applied. + + + + * 1: Strict format that includes escape characters and row delimiters. Generates a string that can be parsed when entered into the formula bar. Encapsulates returned strings in quotes except for Booleans, Numbers, and Errors. + + + +**Remarks:** + + + +* If `format` is anything other than 0 or 1, `VALUETOTEXT` returns the `#VALUE!` error value. + + + + +## ARRAYTOTEXT + + + +The `ARRAYTOTEXT` function returns an array of text values from any specified range. It passes text values unchanged and converts non-text values to text. + + + +**Syntax:** + + + +_ARRAYTOTEXT(array, [format])_ + + + +**where:** + + + +* array: The array to return as text. + + + +* [format] (Optional): The format of the returned data. It can be one of two values: + + + + * 0: Default. Concise format that is easy to read. The text returned will be the same as the text rendered in a cell that has general formatting applied. + + + + * 1: Strict format that includes escape characters and row delimiters. Generates a string that can be parsed when entered into the formula bar. Encapsulates returned strings in quotes except for Booleans, Numbers, and Errors. + + + +**Remarks:** + + + +* The concise format returns a list of values inside one cell, whereas the strict format returns an array of the same size and shape as the input. + + + +* If `format` is anything other than `0` or `1`, `ARRAYTOTEXT` returns the `#VALUE!` error value. + + + +## TOCOL + + + +The `TOCOL` function returns the array in a single column. + + + +**Syntax:** + + + +_TOCOL(array, [ignore], [scan_by_column])_ + + + +**where:** + + + +* array: The array or reference to return as a column. + + + +* [ignore] (Optional): Whether to ignore certain types of values. By default, no values are ignored. Specify one of the following: + + + + * 0: Keep all values (default) + + + + * 1: Ignore blanks + + + + * 2: Ignore errors + + + + * 3: Ignore blanks and errors + + + +* [scan_by_column] (Optional): Scan the array by column. By default, the array is scanned by row. Scanning determines whether the values are ordered by row or by column. + + + +**Remarks:** + + + +* If scan_by_column is omitted or `FALSE`, the array is scanned by row; If `TRUE`, the array is scanned by column. + + + +* `TOCOL` returns a `#VALUE!` error when an array constant contains one or more numbers that are not a whole number. + + + +* `TOCOL` returns a `#NUM!` error when the array is too large. + + + +## TOROW + + + +The `TOROW` function returns the array in a single row. + + + +**Syntax:** + + + +_TOROW(array, [ignore], [scan_by_column])_ + + + +**where:** + + + +* array: The array or reference to return as a row. + + + +* [ignore] (Optional): Whether to ignore certain types of values. By default, no values are ignored. Specify one of the following: + + + + * 0: Keep all values (default) + + + + * 1: Ignore blanks + + + + * 2: Ignore errors + + + + * 3: Ignore blanks and errors + + + +* [scan_by_column] (Optional): Scan the array by column. By default, the array is scanned by row. Scanning determines whether the values are ordered by row or by column. + + + +**Remarks:** + + + +* If scan_by_column is omitted or `FALSE`, the array is scanned by row; If `TRUE`, the array is scanned by column. + + + +* `TOROW` returns a `#VALUE!` error when an array constant contains one or more numbers that are not a whole number. + + + +* `TOROW` returns a `#NUM!` error when the array is too large. + + + +## CHOOSECOLS + + + +The `CHOOSECOLS` function returns the specified columns from an array. + + + +**Syntax:** + + + +_CHOOSECOLS(array, col_num1, [col_num2], …)_ + + + +**where:** + + + +* array: The array containing the columns to be returned in the new array. + + + +* col_num1: The first column to be returned. + + + +* [col_num2] (Optional): Additional columns to be returned. + + + +**Remarks:** + + +* `CHOOSECOLS` returns a `#VALUE!` error if the absolute value of any of the col_num arguments is zero or exceeds the number of columns in the array. + + + +## CHOOSEROWS + + +The `CHOOSEROWS` function returns the specified rows from an array. + + +**Syntax:** + + +_CHOOSEROWS(array, row_num1, [row_num2], …)_ + + +**where:** + + +* array: The array containing the rows to be returned in the new array. + + +* row_num1: The first row number to be returned. + + +* [row_num2] (Optional): Additional row numbers to be returned. + + +**Remarks:** + + +`CHOOSEROWS` returns a `#VALUE!` error if the absolute value of any of the row_num arguments is zero or exceeds the number of rows in the array. + + + +## SEQUENCE + + + +The `SEQUENCE` function allows you to generate a list of sequential numbers in an array, such as 1, 2, 3, 4. + + + +**Syntax:** + + + +_SEQUENCE(rows, [columns], [start], [step])_ + + + +**where:** + + + +* rows: The number of rows to return. Required. + + + +* [columns] (Optional): The number of columns to return. + + + +* [start] (Optional): The first number in the sequence. + + + +* [step] (Optional): The amount to increment each subsequent value in the array. + + +**Remarks:** + + + +* Any missing optional arguments will default to 1. If you omit the rows argument, you must provide at least one other argument. + + + +* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. In the example above, the array for our SEQUENCE formula is range C1:G4. + + + +* The `SEQUENCE` function will return an array, which will spill if it's the final result of a formula. + + + +## TEXTSPLIT + + + +The `TEXTSPLIT` function splits text strings by using column and row delimiters. + + + +**Syntax:** + + + +_TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])_ + + + +**where:** + + + +* text: The text you want to split. + + + +* col_delimiter: The text that marks the point where to spill the text across columns. + + + +* [row_delimiter] (Optional): The text that marks the point where to spill the text down rows. + + + +* [ignore_empty] (Optional): Specify `TRUE` to ignore consecutive delimiters. Defaults to `FALSE`, which creates an empty cell. + + + +* [match_mode] (Optional): Specify 1 to perform a case-insensitive match. Defaults to 0, which does a case-sensitive match. + + + +* [pad_with] (Optional): The value with which to pad the result. The default is `#N/A`. + + + +**Remarks:** + + + +* If there is more than one delimiter, then an array constant must be used. For example, to split by both a comma and a period, use _TEXTSPLIT(A1,{",","."})_. + + + +## TAKE + + + +The `TAKE` function returns a specified number of contiguous rows or columns from the start or end of an array. + + + +**Syntax:** + + + +_TAKE(array, rows, [columns])_ + + + +**where:** + + + +* array: The array from which to take rows or columns. + + + +* rows: The number of rows to take. A negative value takes from the end of the array. + + + +* [columns] (Optional): The number of columns to take. A negative value takes from the end of the array. + + + +**Remarks:** + + + +* `TAKE` returns a `#CALC!` error to indicate an empty array when either rows or columns is 0. + + + +* `TAKE` returns a `#NUM!` error when the array is too large. + + + +## DROP + + + +The `DROP` function excludes a specified number of rows or columns from the start or end of an array. You might find this function useful to remove headers and footers in an Excel report to return only the data. + + + +**Syntax:** + + + +_DROP(array, rows, [columns])_ + + + +**where:** + + + +* array: The array from which to drop rows or columns. + + + +* rows: The number of rows to drop. A negative value drops from the end of the array. + + + +* [columns] (Optional): The number of columns to exclude. A negative value drops from the end of the array. + + + +**Remarks:** + + + +* `DROP` returns a `#CALC!` error to indicate an empty array when rows or columns is 0. + + + +* `DROP` returns a `#NUM!` error when the array is too large. + + + +## EXPAND + + + +The `EXPAND` function expands or pads an array to specified row and column dimensions. + + + +**Syntax:** + + + +_EXPAND(array, rows, [columns], [pad_with])_ + + + +**where:** + + + +* array: The array to expand. + + + +* rows: The number of rows in the expanded array. If missing, rows will not be expanded. + + + +* [columns] (Optional): The number of columns in the expanded array. If missing, columns will not be expanded. + + + +* [pad_with] (Optional): The value with which to pad. The default is `#N/A`. + + + +**Remarks:** + + + +* If rows isn’t provided or is empty, the default value is the number of rows in the array argument. + + + +* If columns isn’t provided or is empty, the default value is the number of columns in the array argument. + + + +* `EXPAND` returns a `#VALUE!` error when the rows or columns argument is less than the rows or columns in the array argument. + + + +* `EXPAND` returns a `#N/A!` error in padded cells if pad_with is not provided. + + + +* `EXPAND` returns a `#NUM!` error when the array is too large. + + + +## WRAPROWS + + + +The `WRAPROWS` function wraps the provided row or column of values by rows after a specified number of elements to form a new array. + + +**Syntax:** + + + +_WRAPROWS(vector, wrap_count, [pad_with])_ + + + +**where:** + + + +* vector: The vector or reference to wrap. + + + +* wrap_count: The maximum number of values for each row. + + + +* [pad_with] (Optional): The value with which to pad. The default is `#N/A`. + + + +**Remarks:** + + + +* The elements of the vector are placed into a 2-dimensional array by row. Each row has wrap_count elements. The row is padded with pad_with if there are insufficient elements to fill it. + + + +* If wrap_count is greater than or equal to the number of elements in vector, then the vector is simply returned in a single row. + + + +* `WRAPROWS` returns a `#VALUE!` error when vector is not a one-dimensional array. + + +* `WRAPROWS` returns a `#NUM!` error when wrap_count is less than 1. + + +* `WRAPROWS` returns a `#N/A!` error for each cell in the return array that has no results. + + + +## WRAPCOLS + + + +The `WRAPCOLS` function wraps the provided row or column of values by columns after a specified number of elements to form a new array. + + + +**Syntax:** + + + +_WRAPCOLS(vector, wrap_count, [pad_with])_ + + + +**where:** + + + +* vector: The vector or reference to wrap. + + + +* wrap_count: The maximum number of values for each column. + + + +* [pad_with] (Optional): The value with which to pad. The default is `#N/A`. + + + +**Remarks:** + + + +* The elements of the vector are placed into a 2-dimensional array by column. Each column has wrap_count elements. The column is padded with pad_with if there are insufficient elements to fill it. + + + +* If wrap_count is greater than or equal to the number of elements in vector, then the vector is simply returned in a single column. + + + +* `WRAPCOLS` returns a `#VALUE!` error when vector is not a one-dimensional array. + + + +* `WRAPCOLS` returns a `#NUM!` error when wrap_count is less than 1. + + + +* `WRAPCOLS` returns a `#N/A!` error for each cell in the return array that has no results. + + + +## SORT + + + +The `SORT` function sorts the contents of a range or array. + + + +**Syntax:** + + + +_SORT(array, [sort_index], [sort_order], [by_col])_ + + + +**where:** + + + +* array: The range or array to sort. Required. + + + +* [sort_index] (Optional): A number indicating the row or column to sort by. + + + +* [sort_order] (Optional): A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order. + + + +* [by_col] (Optional): A logical value indicating the desired sort direction; `FALSE` to sort by row (default), `TRUE` to sort by column. + + + +**Remarks:** + + + +* When sort_index is not provided, row1/col1 will be presumed. + + + +* When sort_order is not provided, ascending order will be presumed. + + + +* By default, `SORT` will sort by row, and will only sort by column when by_col is `TRUE`. When by_col is `FALSE` or missing, `SORT will sort by row. + + + +* The `SORT` function is provided to sort data in an array. If you want to sort data in the grid, it's better to use the `SORTBY` function, as it is more flexible. + + + +* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. + + + +* The `SORT` function will return an array, which will spill if it's the final result of a formula. + + + +## SORTBY + + + +The `SORTBY` function sorts the contents of a range or array based on the values in a corresponding range or array. + + + +**Syntax:** + + + +_SORTBY(array, by_array1, [sort_order1], [by_array2, sort_order2], …)_ + + + +**where:** + + + +* array: The array or range to sort. + + + +* by_array1: The array or range to sort on. + + + +* [sort_order1] (Optional): The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending. + + + +* [by_array2] (Optional): The array or range to sort on. + + + +* [sort_order2] (Optional): The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending. + + + +**Remarks:** + + + +* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. + + + +* The `SORTBY` function will return an array, which will spill if it's the final result of a formula. + + + +## FILTER + + + +The `FILTER` function allows you to filter a range of data based on criteria you define. + + + +**Syntax:** + + + +_FILTER(array, include, [if_empty])_ + + + +**where:** + + + +* array: The array, or range to filter. + + + +* include: A Boolean array whose height or width is the same as the array. + + + +* [if_empty] (Optional): The value to return if all values in the included array are empty (filter returns nothing). + + + +**Remarks:** + + + +* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. + + + +* The `FILTER` function will return an array, which will spill if it's the final result of a formula. + + + +* If your dataset has the potential of returning an empty value, then use the 3rd argument (`[if_empty]`). Otherwise, a `#CALC!` error will result, as Excel does not currently support empty arrays. + + + +* If any value of the include argument is an error (`#N/A`, `#VALUE`, etc.) or cannot be converted to a Boolean, the `FILTER` function will return an error. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md index 1945f63b1..51bdfed66 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md @@ -2574,3 +2574,92 @@ _LINEST(known_y's, [known_x's], [const], [stats]))_ * If const is `FALSE`, b is set equal to 0 * stats (Optional). This is a logical value specifying whether to return additional regression statistics. + +## GAUSS + +`GAUSS` function calculates the probability that a member of a standard normal population will fall between the mean and z standard deviations from the mean. + +**Syntax:** + +_GAUSS(z)_ + +**where:** + +* z : The number of standard deviations away from the mean of the standard normal distribution. A positive z value indicates that the data point is above the mean, while a negative z value indicates that it is below the mean. + +**Remarks:** + +* If z is not a valid number, GAUSS returns the `#NUM!` error value. + +* If z is not a valid data type, GAUSS returns the `#VALUE!` error value. + +* Because NORM.S.DIST(0,True) always returns 0.5, GAUSS(z) will always be 0.5 less than NORM.S.DIST(z,True). + +## GAMMA + +`GAMMA` function returns the gamma function value for a given number. + +**Syntax:** + +_GAMMA(number)_ + +**where:** + +* Number: The value for which is used to calculate the gamma function. + +**Remarks:** + +* `GAMMA` uses the following equation: Γ(N+1)=N×Γ(N). + +* If Number is a negative integer or 0, `GAMMA` returns the `#NUM!` error value. + +* If Number contains characters that are not valid, `GAMMA` returns the `#VALUE!` error value. + +## VAR.S + +The `VAR.S` function estimates the variance based on a sample of a population, ignoring logical values and text within the sample. + +**Syntax:** + +_VAR.S(number1, [number2], ... )_ + +**where:** + +* Number1: Required. The first number argument corresponding to a sample of a population. +* Number2, ...: Optional. Additional number arguments, up to 254, that correspond to a sample of a population. + +**Remarks:** + +* `VAR.S` assumes that its arguments represent a sample of the population. If your data represents the entire population, use the `VAR.P` function instead. + +* Arguments can be numbers or names, arrays, or references that contain numbers. +Logical values and text representations of numbers that are typed directly into the list of arguments are counted. + +* If an argument is an array or reference, only numbers within that array or reference are counted; empty cells, logical values, text, or error values are ignored. + +* Arguments that are error values or text that cannot be translated into numbers will cause errors. +To include logical values and text representations of numbers in a reference as part of the calculation, use the `VARA` function. + +## FREQUENCY + +The `FREQUENCY` function calculates how often values occur within a range of values and returns a vertical array of numbers representing the frequency distribution. + +**Syntax:** + +_FREQUENCY(data_array, bins_array)_ + +**where:** + +* data_array: An array or reference to a set of values for which you want to count frequencies. + +* bins_array: An array or reference to intervals into which you want to group the values in data_array. + +**Remarks:** + +* The `FREQUENCY` function returns an array with one more element than the number of elements in bins_array. The extra element represents the count of values in data_array that are greater than the highest value in bins_array. + +* If data_array contains no values, `FREQUENCY `returns an array of zeros. + +* If bins_array contains no values, `FREQUENCY` returns the total number of elements in data_array. + +* `FREQUENCY` ignores blank cells and text in data_array. \ No newline at end of file From e050d20677636173a79b19b501da1cc0cbac6925 Mon Sep 17 00:00:00 2001 From: ushasundarajan Date: Wed, 28 Aug 2024 17:22:56 +0530 Subject: [PATCH 2/5] changes committed --- .../Supported-Formulas/Financial-Formulas.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md index e8c402f3e..f8837649a 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md @@ -1099,4 +1099,5 @@ _COUPNUM(settlement, maturity, frequency, [basis])_ * If basis is outside the range 0-4, `COUPNUM` returns `#NUM!`. -* If settlement is greater than or equal to maturity, `COUPNUM` returns `#NUM!`. \ No newline at end of file +* If settlement is greater than or equal to maturity, `COUPNUM` returns `#NUM!`. + From 2b862d14469dfcfb0337a99ee1421b842b04d487 Mon Sep 17 00:00:00 2001 From: ushasundarajan Date: Mon, 23 Sep 2024 17:03:11 +0530 Subject: [PATCH 3/5] Removed statistical and financial formulas --- .../Supported-Formulas/Financial-Formulas.md | 359 +----------------- .../Supported-Formulas/statistical.md | 91 +---- 2 files changed, 2 insertions(+), 448 deletions(-) diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md index f8837649a..03f51e44f 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md @@ -743,361 +743,4 @@ _INTRATE(settlement, maturity, investment, redemption, [basis])_ * Redemption :The amount to be received at maturity. -* Basis : The type of specifies the day count basis to used in the calculation. - - - -## NOMINAL - -the function `NOMINAL` returns the nominal annual interest rate, given the effective rate and the number of compounding periods per year. - -**Syntax:** - -_NOMINAL(effect_rate, npery)_ - -**Where:** - -* effect_rate: The effective interest rate. - -* npery: The number of compounding periods per year. - -**Remarks:** - -* Npery is truncated to an integer. - -* If either argument is nonnumeric, `NOMINAL` returns the `#VALUE!` error value. - -* If effect_rate ≤ 0 or if npery < 1, `NOMINAL` returns the `#NUM!` error value. - -* `NOMINAL` is related to `EFFECT` function. The relationship between `NOMINAL` and `EFFECT` is shown in the following equation: - - `effective_rate = (1 + (nominal_rate / npery))^npery - 1` - - - -## MDURATION - -The function `MDURATION` returns the modified Macauley duration for a security with an assumed par value of $100. - -**Syntax:** - -_MDURATION(settlement, maturity, coupon, yld, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* coupon: The security's annual coupon rate. - -* yld: The security's annual yield. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not valid, `MDURATION` returns `#VALUE!`. - -* If yld < 0 or coupon < 0, it returns `#NUM!`. If frequency is not 1, 2, or 4, it returns `#NUM!`. - -* If basis is outside the range 0-4, it returns `#NUM!`. - -* If settlement is greater than or equal to maturity, it returns `#NUM!`. - -* Equation to calculate `MDURATION` is `Modified Duration = Macauley Duration / (1 + (yld / frequency))`. - - - -## PDURATION - -The function `PDURATION` returns the number of periods required by an investment to reach a specified value. - -**Syntax:** - -_PDURATION(rate, pv, fv)_ - -**Where:** - -* rate: The interest rate per period. - -* pv: The present value of the investment. - -* fv: The desired future value of the investment. - -**Remarks:** - -* If rate is less than or equal to 0, or if pv or fv is less than or equal to 0, `PDURATION` returns the `#NUM!` error value. - -* If any argument is nonnumeric, `PDURATION` returns the `#VALUE!` error value. - -* The `PDURATION` function calculates the number of periods required using the following equation: - - `PDURATION = LOG(fv / pv) / LOG(1 + rate)` - - - -## COUPDAYS - -The function `COUPDAYS` returns the number of days in the coupon period that contains the settlement date. - -**Syntax:** - -_COUPDAYS(settlement, maturity, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The type of day count basis to use: - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not a valid date, `COUPDAYS` returns `#VALUE!`. - -* If frequency is any number other than 1, 2, or 4, `COUPDAYS` returns `#NUM!`. - -* If basis is outside the range 0-4, `COUPDAYS` returns `#NUM!`. - -* If settlement is greater than or equal to maturity, `COUPDAYS` returns `#NUM!`. - - - -## COUPDAYBS - -The function `COUPDAYBS` returns the number of days from the beginning of a coupon period until its settlement date. - -**Syntax:** - -_COUPDAYBS(settlement, maturity, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not valid, `COUPDAYBS` returns `#VALUE!`. - -* If frequency is any number other than 1, 2, or 4, `COUPDAYBS` returns `#NUM!`. - -* If basis is outside the range 0-4, it returns `#NUM!`. - -* If settlement is greater than or equal to maturity, it returns `#NUM!`. - - - -## COUPDAYSNC - -The function `COUPDAYSNC` returns the number of days from the settlement date to the next coupon date. - -**Syntax:** - -_COUPDAYSNC(settlement, maturity, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not valid, `COUPDAYSNC` returns `#VALUE!`. - -* If frequency is any number other than 1, 2, or 4, `COUPDAYSNC` returns `#NUM!`. - -* If basis is outside the range 0-4, it returns `#NUM!`. - -* If settlement is greater than or equal to maturity, it returns `#NUM!`. - - - -## COUPPCD - -The function `COUPPCD` returns a number that represents the previous coupon date before the settlement date. - -**Syntax:** - -_COUPPCD(settlement, maturity, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not valid, `COUPPCD` returns `#VALUE!`. - -* If frequency is any number other than 1, 2, or 4, `COUPPCD` returns `#NUM!`. - -* If basis is outside the range 0-4, it returns `#NUM!`. - -* If settlement is greater than or equal to maturity, it returns `#NUM!`. - - - -## COUPNCD - -The function `COUPNCD` returns a number that represents the next coupon date after the settlement date. - -**Syntax:** - -_COUPNCD(settlement, maturity, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not valid, `COUPNCD` returns `#VALUE!`. - -* If frequency is any number other than 1, 2, or 4, `COUPNCD` returns `#NUM!`. - -* If basis is outside the range 0-4, it returns `#NUM!`. - -* If settlement is greater than or equal to maturity, it returns `#NUM!`. - - - -## COUPNUM - -The function `COUPNUM` returns the number of coupons payable between the settlement date and maturity date, rounded up to the nearest whole coupon. - -**Syntax:** - -_COUPNUM(settlement, maturity, frequency, [basis])_ - -**Where:** - -* settlement: The security's settlement date. - -* maturity: The security's maturity date. - -* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). - -* basis (Optional): The day count basis to use (default is 0: US (NASD) 30/360): - - * 0 or omitted: US (NASD) 30/360 - - * 1: Actual/actual - - * 2: Actual/360 - - * 3: Actual/365 - - * 4: European 30/360 - -**Remarks:** - -* Dates are stored as serial numbers. For example, January 1, 1900 is 1, and January 1, 2008 is 39448. - -* If settlement or maturity is not valid, `COUPNUM` returns `#VALUE!`. - -* If frequency is any number other than 1, 2, or 4, `COUPNUM` returns `#NUM!`. - -* If basis is outside the range 0-4, `COUPNUM` returns `#NUM!`. - -* If settlement is greater than or equal to maturity, `COUPNUM` returns `#NUM!`. - +* Basis : The type of specifies the day count basis to used in the calculation. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md index 51bdfed66..6cfb5d9da 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md @@ -2573,93 +2573,4 @@ _LINEST(known_y's, [known_x's], [const], [stats]))_ * If const is `FALSE`, b is set equal to 0 -* stats (Optional). This is a logical value specifying whether to return additional regression statistics. - -## GAUSS - -`GAUSS` function calculates the probability that a member of a standard normal population will fall between the mean and z standard deviations from the mean. - -**Syntax:** - -_GAUSS(z)_ - -**where:** - -* z : The number of standard deviations away from the mean of the standard normal distribution. A positive z value indicates that the data point is above the mean, while a negative z value indicates that it is below the mean. - -**Remarks:** - -* If z is not a valid number, GAUSS returns the `#NUM!` error value. - -* If z is not a valid data type, GAUSS returns the `#VALUE!` error value. - -* Because NORM.S.DIST(0,True) always returns 0.5, GAUSS(z) will always be 0.5 less than NORM.S.DIST(z,True). - -## GAMMA - -`GAMMA` function returns the gamma function value for a given number. - -**Syntax:** - -_GAMMA(number)_ - -**where:** - -* Number: The value for which is used to calculate the gamma function. - -**Remarks:** - -* `GAMMA` uses the following equation: Γ(N+1)=N×Γ(N). - -* If Number is a negative integer or 0, `GAMMA` returns the `#NUM!` error value. - -* If Number contains characters that are not valid, `GAMMA` returns the `#VALUE!` error value. - -## VAR.S - -The `VAR.S` function estimates the variance based on a sample of a population, ignoring logical values and text within the sample. - -**Syntax:** - -_VAR.S(number1, [number2], ... )_ - -**where:** - -* Number1: Required. The first number argument corresponding to a sample of a population. -* Number2, ...: Optional. Additional number arguments, up to 254, that correspond to a sample of a population. - -**Remarks:** - -* `VAR.S` assumes that its arguments represent a sample of the population. If your data represents the entire population, use the `VAR.P` function instead. - -* Arguments can be numbers or names, arrays, or references that contain numbers. -Logical values and text representations of numbers that are typed directly into the list of arguments are counted. - -* If an argument is an array or reference, only numbers within that array or reference are counted; empty cells, logical values, text, or error values are ignored. - -* Arguments that are error values or text that cannot be translated into numbers will cause errors. -To include logical values and text representations of numbers in a reference as part of the calculation, use the `VARA` function. - -## FREQUENCY - -The `FREQUENCY` function calculates how often values occur within a range of values and returns a vertical array of numbers representing the frequency distribution. - -**Syntax:** - -_FREQUENCY(data_array, bins_array)_ - -**where:** - -* data_array: An array or reference to a set of values for which you want to count frequencies. - -* bins_array: An array or reference to intervals into which you want to group the values in data_array. - -**Remarks:** - -* The `FREQUENCY` function returns an array with one more element than the number of elements in bins_array. The extra element represents the count of values in data_array that are greater than the highest value in bins_array. - -* If data_array contains no values, `FREQUENCY `returns an array of zeros. - -* If bins_array contains no values, `FREQUENCY` returns the total number of elements in data_array. - -* `FREQUENCY` ignores blank cells and text in data_array. \ No newline at end of file +* stats (Optional). This is a logical value specifying whether to return additional regression statistics. \ No newline at end of file From 8bc7765f9728b07c63e82af8e7fb3279cd074e13 Mon Sep 17 00:00:00 2001 From: ushasundarajan Date: Mon, 23 Sep 2024 17:14:51 +0530 Subject: [PATCH 4/5] Changes committed --- .../Supported-Formulas/Financial-Formulas.md | 2 +- .../Supported-Formulas/Math-Trigonometry.md | 161 ++++---- .../Supported-Formulas/Text-Formulas.md | 356 +++++++++--------- .../Supported-Formulas/statistical.md | 2 +- 4 files changed, 269 insertions(+), 252 deletions(-) diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md index 03f51e44f..846d0c885 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md @@ -743,4 +743,4 @@ _INTRATE(settlement, maturity, investment, redemption, [basis])_ * Redemption :The amount to be received at maturity. -* Basis : The type of specifies the day count basis to used in the calculation. \ No newline at end of file +* Basis : The type of specifies the day count basis to used in the calculation. diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md index ff57e60b5..91fafccec 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md @@ -2535,19 +2535,19 @@ _SERIESSUM(x, n, m, coefficients)_ * The argument is non-numeric, it returns the `#VALUE!` error message. +* The argument is non-numeric, it returns the `#VALUE!` error message. -## XLOOKUP -The `XLOOKUP` function allows you to find and return a corresponding value from a table or range based on a search term. +## XLOOKUP -For example, you can look up the price of an automotive part by its part number, or find an employee's name based on their employee ID. +The `XLOOKUP` function allows you to search for a value in a range and return a corresponding value from another range, based on a specified search term. -With `XLOOKUP`, you can search for a value in one column and return a value from another column in the same row, regardless of which side the return column is on. +For example, you can look up the price of an item by its ID or find an employee's name by their employee ID. @@ -2563,59 +2563,58 @@ _XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], -* lookup_value: The value to search for. If omitted, `XLOOKUP` returns blank cells it finds in lookup_array. - +* lookup_value: The value to search for. If omitted, `XLOOKUP` returns blank cells in lookup_array. -* lookup_array: The array or range to search. +* lookup_array: The range or array to search for lookup_value. -* return_array: The array or range to return. +* return_array: The range or array from which to return a corresponding value. -* [if_not_found] (Optional): Where a valid match is not found, return the [if_not_found] text you supply. If a valid match is not found, and [if_not_found] is missing, `#N/A` is returned. +* [if_not_found] (Optional): The value to return if no match is found. If omitted, `#N/A` is returned. -* [match_mode] (Optional): Specify the match type: +* [match_mode] (Optional): Specifies the match type: - * 0 - Exact match. If none found, return `#N/A`. This is the default. + * 0 - Exact match (default). - * -1 - Exact match. If none found, return the next smaller item. + * -1 - Exact match or next smaller item. - * 1 - Exact match. If none found, return the next larger item. + * 1 - Exact match or next larger item. - * 2 - A wildcard match where `*`, `?`, and `~` have special meaning. + * 2 - Wildcard using `*`, `?`, and `~`. -* [search_mode] (Optional): Specify the search mode to use: +* [search_mode] (Optional): Specifies the search order: - * 1 - Perform a search starting at the first item. This is the default. + * 1 - Search from the first item (default). - * -1 - Perform a reverse search starting at the last item. + * -1 - Search from the last item. - * 2 - Perform a binary search that relies on lookup_array being sorted in ascending order. If not sorted, invalid results will be returned. + * 2 - Binary search in ascending order (requires sorted data). - * -2 - Perform a binary search that relies on lookup_array being sorted in descending order. If not sorted, invalid results will be returned. + * -2 - Binary search in descending order (requires sorted data). @@ -2635,19 +2634,20 @@ _XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], -* Using [match_mode] allows you to control whether the function looks for exact matches, approximate matches, or supports wildcard characters. +* The [match_mode] argument allows for control over exact, approximate, and wildcard matches. -* The [search_mode] argument lets you control the order in which the search is performed, which can be useful for optimizing performance on large datasets. +* The [search_mode] controls the search order, optimizing performance on larger datasets. ## XMATCH +Manivannan-E marked this conversation as resolved. -The `XMATCH` function returns the relative position of an item in an array or range of cells. +The `XMATCH` function returns the relative position of an item in a range, similar to `MATCH`, but with additional capabilities for exact and approximate matches. @@ -2663,7 +2663,7 @@ _XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])_ -* lookup_value: The lookup value. +* lookup_value: The value to search for. @@ -2671,7 +2671,7 @@ _XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])_ -* [match_mode] (Optional): Specify the match type: +* [match_mode] (Optional): Specifies the match type: @@ -2687,31 +2687,38 @@ _XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])_ - * 2 - A wildcard match where `*`, `?`, and `~` have special meaning. + * 2 - Wildcard match using `*`, `?`, and `~`. + + + +* [search_mode] (Optional): Specifies the search order: -* [search_mode] (Optional): Specify the search type: + * 1 - Search from first to last (default). - * 1 - Search first-to-last (default). + * -1 - Search from last to first. - * -1 - Search last-to-first (reverse search). + * 2 - Binary search in ascending order (data must be sorted). - * 2 - Perform a binary search that relies on lookup_array being sorted in ascending order. + * -2 - Binary search in descending order (data must be sorted). - If not sorted, invalid results will be returned. +**Remarks:** + +* `XMATCH` is useful for retrieving the position of a value within a range, with more flexibility than `MATCH`. - * -2 - Perform a binary search that relies on lookup_array being sorted in descending order. If not sorted, invalid results will be returned. + +* It supports both normal and reverse search directions, as well as wildcard matching. @@ -2719,7 +2726,7 @@ _XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])_ -The `FLOOR.MATH` function rounds a number down to the nearest integer or to the nearest multiple of significance. +The `FLOOR.MATH` function rounds a number down to the nearest integer or a specified multiple of significance. @@ -2739,11 +2746,11 @@ _FLOOR.MATH(number, significance, mode)_ -* significance (Optional): The multiple to which you want to round. +* significance (Optional): The multiple to which to round down. Defaults to 1. -* mode (Optional): The direction (toward or away from 0) to round negative numbers. +* mode (Optional): Controls rounding of negative numbers. If omitted, negative numbers are rounded away from zero. @@ -2751,30 +2758,27 @@ _FLOOR.MATH(number, significance, mode)_ -* By default, positive numbers with decimal portions are rounded down to the nearest integer. For example, 6.3 is rounded down to 6, using the default significance (1). - +* By default, positive numbers are rounded down to the nearest integer (e.g., 6.3 becomes 6). -* By default, negative numbers with decimal portions are rounded away from 0 to the nearest integer. For example, -6.7 is rounded to -7. +* Negative numbers are rounded away from zero unless the mode argument is used (e.g., -6.7 becomes -7, but with mode set to -1, -6.3 becomes -6). -* By using 0 or a negative number as the mode argument, you can change the direction of the rounding for negative numbers. For example, rounding -6.3 with a significance of 1 and a mode of -1 rounds toward 0, to -6. +* The significance argument defines the multiple to which the number is rounded down. For example, rounding 7.5 with a significance of 3 results in 6. -* The significance argument rounds the number down to the nearest integer that is a multiple of the significance specified. The exception is where the number to be rounded is an integer. For example, for a significance of 3, the number is rounded down to the next integer that is a multiple of 3. - - -* If number divided by a significance of 2 or greater results in a remainder, the result is rounded down. +* If number divided by significance has a remainder, the result is rounded down. ## FLOOR.PRECISE -The `FLOOR.PRECISE` function returns a number that is rounded down to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded down. However, if the number or the significance is zero, zero is returned. + +The `FLOOR.PRECISE` function rounds a number down to the nearest integer or a specified multiple of significance, regardless of the sign. @@ -2790,19 +2794,26 @@ _FLOOR.PRECISE(number, [significance])_ -* number: The value to be rounded. - +* number: The number to be rounded down. -* significance (Optional): The multiple to which number is to be rounded. If omitted, the default value is 1. +* significance (Optional): The multiple to which the number should be rounded. Defaults to 1. **Remarks:** -* The absolute value of the multiple is used, so that the `FLOOR.PRECISE` function returns the mathematical floor irrespective of the signs of number and significance. +* The absolute value of significance is used, meaning `FLOOR.PRECISE` always rounds down, regardless of whether the number is positive or negative. + + + +* If either the number or significance is zero, the function returns zero. + + + +* The rounding behavior remains consistent regardless of the signs of the number or significance. @@ -2810,7 +2821,7 @@ _FLOOR.PRECISE(number, [significance])_ -The `ISO.CEILING` function returns a number that is rounded up to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded up. However, if the number or the significance is zero, zero is returned. +The `ISO.CEILING` function rounds a number up to the nearest integer or a specified multiple of significance. It always rounds up, regardless of whether the number is positive or negative. If the number or significance is zero, it returns zero. @@ -2826,11 +2837,11 @@ _ISO.CEILING(number, [significance])_ -* number: The value to be rounded. +* number: The value to be rounded up. -* significance (Optional): The optional multiple to which number is to be rounded. If omitted, the default value is 1. +* significance (Optional): The multiple to which number is to be rounded. If omitted, it defaults to 1. @@ -2838,14 +2849,18 @@ _ISO.CEILING(number, [significance])_ -* The absolute value of the multiple is used, so that the `ISO.CEILING` function returns the mathematical ceiling irrespective of the signs of number and significance. +* The absolute value of the multiple is used, meaning `ISO.CEILING` always rounds up, regardless of the sign of the number or significance. + + + +* If either number or significance is zero, the function returns zero. ## CEILING.PRECISE -The function `CEILING.PRECISE` returns a number that is rounded up to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded up. However, if the number or the significance is zero, zero is returned. +The `CEILING.PRECISE` function rounds a number up to the nearest integer or a specified multiple of significance. Like ISO.CEILING, it always rounds up regardless of whether the number is positive or negative. If the number or significance is zero, it returns zero. @@ -2861,18 +2876,22 @@ _CEILING.PRECISE(number, [significance])_ -* number: The value to be rounded. +* number: The value to be rounded up. -* significance (Optional): The multiple to which number is to be rounded. If omitted, the default value is 1. +* significance (Optional): The multiple to which the number is rounded. If omitted, it defaults to 1. **Remarks:** -* The absolute value of the multiple is used, so that the `CEILING.PRECISE` function returns the mathematical ceiling irrespective of the signs of number and significance. +* `CEILING.PRECISE` uses the absolute value of the multiple, ensuring that the function rounds up regardless of the signs of the number or significance. + + + +* If the number or significance is zero, the result is zero. @@ -2880,7 +2899,7 @@ _CEILING.PRECISE(number, [significance])_ -The `HSTACK` function appends arrays horizontally and in sequence to return a larger array. +The `HSTACK` function combines arrays horizontally (side by side) to form a larger array. @@ -2896,26 +2915,26 @@ _HSTACK(array1, [array2], ...)_ -* array: The arrays to append. +* array: The arrays to be appended horizontally. **Remarks:** -* `HSTACK` returns the array formed by appending each of the array arguments in a column-wise fashion. The resulting array will have the following dimensions: +* `HSTACK` returns an array where each input array is appended in a column-wise fashion. - * Rows: The maximum of the row count from each of the array arguments. + * Rows: The number of rows in the result will be the maximum number of rows across all input arrays. - * Columns: The combined count of all the columns from each of the array arguments. + * Columns: The number of columns will be the sum of the columns from all input arrays. - -* If an array has fewer rows than the maximum width of the selected arrays. + +* If an array has fewer rows than the maximum row count, `#N/A` will fill the missing rows. You can use the `IFERROR` function to handle these errors. @@ -2927,7 +2946,7 @@ _HSTACK(array1, [array2], ...)_ -The function `VSTACK` Appends arrays vertically and in sequence to return a larger array. +The function `VSTACK` appends arrays vertically (one below the other) to return a larger array. @@ -2943,7 +2962,7 @@ _VSTACK(array1, [array2], ...)_ -* array: The arrays to append. +* array: The arrays to be appended vertically. @@ -2951,15 +2970,15 @@ _VSTACK(array1, [array2], ...)_ -* `VSTACK` returns the array formed by appending each of the array arguments in a row-wise fashion. The resulting array will have the following dimensions: +* `VSTACK` returns an array where each input array is appended in a row-wise fashion. - * Rows: The combined count of all the rows from each of the array arguments. + * Rows: The result will have the combined number of rows from all input arrays. - * Columns: The maximum of the column count from each of the array arguments. + * Columns: The result will have the maximum column count of the input arrays. @@ -2975,7 +2994,7 @@ _VSTACK(array1, [array2], ...)_ -The function `PHi` returns the value of the density function for a standard normal distribution. +The `PHi` function returns the value of the probability density function for the standard normal distribution for a given number. @@ -2991,7 +3010,7 @@ _PHIL(x)_ -* x: The number for which you want the density of the standard normal distribution. +* x: The number for which the probability density is calculated. @@ -2999,8 +3018,8 @@ _PHIL(x)_ -* If x is a numeric value that is not valid, `PHI` returns the `#NUM!` error value. +* If x is not a valid numeric value, `PHI` will return the `#NUM!` error. -* If x is using a data type that is not valid, such as a nonnumeric value, `PHI` returns the `#VALUE!` error value. \ No newline at end of file +* If x of an invalid data type, `PHI` will return the `#VALUE!` error. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md index 90167a54b..03365a8eb 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md @@ -1127,7 +1127,7 @@ Remark: -The `UNIQUE` function returns a list of unique values from a list or range. +The `UNIQUE` function returns a list of unique values from a specified range or array. @@ -1143,15 +1143,15 @@ _UNIQUE(array, [by_col], [exactly_once])_ -* array: The range or array from which to return unique rows or columns. +* array: The range or array from which to return unique values. -* [by_col] (Optional): A logical value indicating how to compare. If `TRUE` compares columns against each other and returns unique columns.If `FALSE` (or omitted) compares rows against each other and returns unique rows. +* [by_col] (Optional): If `TRUE`, compares columns for uniqueness; if `FALSE` or omitted, compares rows. -* [exactly_once] (Optional): A logical value that will return rows or columns that occur exactly once in the range or array.If `TRUE` returns all distinct rows or columns that occur exactly once.If `FALSE` (or omitted) returns all distinct rows or columns. +* [exactly_once] (Optional): If `TRUE`, returns only values that appear exactly once; if `FALSE` or omitted, returns all distinct values. @@ -1159,11 +1159,15 @@ _UNIQUE(array, [by_col], [exactly_once])_ -* An array can be thought of as a row or column of values, or a combination of rows and columns of values. +* The result will spill into adjacent cells if it’s the final result of a formula. -* The `UNIQUE` function returns an array that will spill into the appropriate number of cells if it's the final result of a formula. +* If [exactly_once] is set to `TRUE`, values that appear more than once are excluded from the result. + + + +* If [by_col] is `TRUE`, the function evaluates unique columns instead of rows. @@ -1171,7 +1175,7 @@ _UNIQUE(array, [by_col], [exactly_once])_ -The `TEXTAFTER` function returns text that occurs after a given character or string. It is the opposite of the `TEXTBEFORE` function. +The `TEXTAFTER` function extracts the text that appears after a specified delimiter in a string. @@ -1187,27 +1191,27 @@ _TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_f -* text: The text you are searching within. Wildcard characters are not allowed. +* text: The input text to search within. -* delimiter: The text that marks the point after which you want to extract. +* delimiter: The text or character after which you want to extract. -* [instance_num] (Optional): The instance of the delimiter after which you want to extract the text. By default, instance_num = 1. A negative number starts searching text from the end. +* [instance_num] (Optional): The instance of the delimiter to search for. Defaults to 1 (first instance). -* [match_mode] (Optional): Determines whether the text search is case-sensitive. The default is case-sensitive. If 0 - Case-sensitive, if 1 - Case-insensitive. +* [match_mode] (Optional): Determines if the search is case-sensitive (0 for case-sensitive, 1 for case-insensitive). -* [match_end]: Optional. Treats the end of the text as a delimiter. By default, the text is an exact match. If 0 - Don't match the delimiter against the end of the text, if 1 - Match the delimiter against the end of the text. +* [match_end] (Optional): If `TRUE`, treats the end of the text as a delimiter. -* [if_not_found] (Optional): The value returned if no match is found. By default, `#N/A` is returned. +* [if_not_found] (Optional): Value to return if the delimiter is not found. Defaults to `#N/A`. @@ -1215,19 +1219,19 @@ _TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_f -* When searching with an empty delimiter value, `TEXTAFTER` matches immediately. It returns the entire text when searching from the front (if instance_num is positive) and empty text when searching from the end (if instance_num is negative). +* If the delimiter is not found, a `#N/A` error is returned, unless [if_not_found] is specified. -* `TEXTAFTER` returns a `#N/A` error if the delimiter isn't contained in text. +* If [instance_num] equal to 0 or greater than the length of text, a `#VALUE!` error returned. -* `TEXTAFTER` returns a `#VALUE!` error if instance_num = 0 or if instance_num is greater than the length of text. +* The [instance_num] argument allows for both positive and negative numbers. Positive values search from the start, and negative values search from the end. -* `TEXTAFTER` returns a `#N/A` error if instance_num is greater than the number of occurrences of the delimiter. +* The function supports case-sensitive and case-insensitive search modes using the [match_mode] argument. @@ -1236,7 +1240,7 @@ _TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_f -The `TEXTBEFORE` function returns text that occurs before a given character or string. It is the opposite of the `TEXTAFTER` function. +The `TEXTBEFORE` function extracts the text that appears before a specified delimiter in a string. @@ -1252,27 +1256,27 @@ _TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_ -* text: The text you are searching within. Wildcard characters are not allowed. If text is an empty string, `TEXTBEFORE` returns empty text. +* text: The input text to search within. -* delimiter: The text that marks the point before which you want to extract. +* delimiter: The text or character before which you want to extract. -* [instance_num] (Optional): The instance of the delimiter after which you want to extract the text. By default, instance_num = 1. A negative number starts searching text from the end. +* [instance_num] (Optional): The instance of the delimiter to search for. Defaults to 1 (first instance). -* [match_mode] (Optional): Determines whether the text search is case-sensitive. The default is case-sensitive. If 0 - Case-sensitive, if 1 - Case-insensitive. +* [match_mode] (Optional): Case-sensitivity control (0 for case-sensitive, 1 for case-insensitive). -* [match_end] (Optional): Treats the end of the text as a delimiter. By default, the text is an exact match. If 0 - Don't match the delimiter against the end of the text, if 1 - Match the delimiter against the end of the text. +* [match_end] (Optional): If TRUE, treats the end of the text as a delimiter. -* [if_not_found] (Optional): The value returned if no match is found. By default, #N/A is returned. +* [if_not_found] (Optional): Value to return if the delimiter is not found. Defaults to #N/A. @@ -1280,19 +1284,19 @@ _TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_ -* When searching with an empty delimiter value, `TEXTBEFORE` matches immediately. It returns empty text when searching from the front (if instance_num is positive) and the entire text when searching from the end (if instance_num is negative). +* If the delimiter is not found, a #N/A error is returned, unless if_not_found is specified. -* `TEXTBEFORE` returns a `#VALUE!` error if instance_num = 0 or if instance_num is greater than the length of text. +* if [instance_num] is equal to 0 or greater than the length of text, a `#VALUE!` error returned. -* `TEXTBEFORE` returns a `#N/A` error if the delimiter isn’t contained in text. +* Similar to `TEXTAFTER`, negative [instance_num] values search from the end of the string. -* `TEXTBEFORE` returns a `#N/A` error if instance_num is greater than the number of occurrences of the delimiter in text. +* The function supports both case-sensitive and case-insensitive search modes using the [match_mode] argument. @@ -1300,7 +1304,7 @@ _TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_ -The `VALUETOTEXT` function returns text from any specified value. It passes text values unchanged and converts non-text values to text. +The `VALUETOTEXT` function converts a value into a text format. @@ -1316,37 +1320,38 @@ _VALUETOTEXT(value, [format])_ -* value: The value to return as text. - +* value: The value to return to text. -* [format] (Optional): The format of the returned data. It can be one of two values: +* [format] (Optional): Determines the format: - * 0: Default. Concise format that is easy to read. The text returned will be the same as the text rendered in a cell that has general formatting applied. + * 0: Concise format (default). - * 1: Strict format that includes escape characters and row delimiters. Generates a string that can be parsed when entered into the formula bar. Encapsulates returned strings in quotes except for Booleans, Numbers, and Errors. + * 1: Strict format with escape characters for formulas. **Remarks:** -* If `format` is anything other than 0 or 1, `VALUETOTEXT` returns the `#VALUE!` error value. +* If an invalid format is provided, `#VALUE!` error is returned. +* The concise format is human-readable, while the strict format preserves data structure. + -## ARRAYTOTEXT +## ARRAYTOTEXT -The `ARRAYTOTEXT` function returns an array of text values from any specified range. It passes text values unchanged and converts non-text values to text. +The `ARRAYTOTEXT` function function converts an array into text. **Syntax:** @@ -1361,19 +1366,19 @@ _ARRAYTOTEXT(array, [format])_ -* array: The array to return as text. +* array: The array to convert to text. -* [format] (Optional): The format of the returned data. It can be one of two values: +* [format] (Optional): Determines the output format: - * 0: Default. Concise format that is easy to read. The text returned will be the same as the text rendered in a cell that has general formatting applied. + * 0: Concise format (default). - * 1: Strict format that includes escape characters and row delimiters. Generates a string that can be parsed when entered into the formula bar. Encapsulates returned strings in quotes except for Booleans, Numbers, and Errors. + * 1: Strict format with escape characters and row delimiters. @@ -1381,11 +1386,11 @@ _ARRAYTOTEXT(array, [format])_ -* The concise format returns a list of values inside one cell, whereas the strict format returns an array of the same size and shape as the input. +* The concise format displays the output within a single cell, while the strict format presents a more detailed array layout with escape characters. -* If `format` is anything other than `0` or `1`, `ARRAYTOTEXT` returns the `#VALUE!` error value. +* If the `format` argument is not 0 or 1, a `#VALUE!` error is returned. @@ -1393,7 +1398,7 @@ _ARRAYTOTEXT(array, [format])_ -The `TOCOL` function returns the array in a single column. +The `TOCOL` function transforms an array into a single column. @@ -1409,47 +1414,46 @@ _TOCOL(array, [ignore], [scan_by_column])_ -* array: The array or reference to return as a column. +* array: The array to convert into a column. -* [ignore] (Optional): Whether to ignore certain types of values. By default, no values are ignored. Specify one of the following: +* [ignore] (Optional): Specifies which values to ignore: - * 0: Keep all values (default) + * 0: Keep all values (default). - * 1: Ignore blanks + * 1: Ignore blanks. - * 2: Ignore errors + * 2: Ignore errors. - * 3: Ignore blanks and errors + * 3: Ignore blanks and errors. -* [scan_by_column] (Optional): Scan the array by column. By default, the array is scanned by row. Scanning determines whether the values are ordered by row or by column. - +* [scan_by_column] (Optional): If `TRUE`, scans by column instead of by row. **Remarks:** -* If scan_by_column is omitted or `FALSE`, the array is scanned by row; If `TRUE`, the array is scanned by column. +* The function will return all values in a single column, even if the original array was multidimensional. -* `TOCOL` returns a `#VALUE!` error when an array constant contains one or more numbers that are not a whole number. +* If [scan_by_column] is set to `TRUE`, the function will scan the array by column; otherwise, it defaults to scanning by row. -* `TOCOL` returns a `#NUM!` error when the array is too large. +* If an array contains non-integer values, the function returns a `#VALUE!` error. @@ -1457,7 +1461,7 @@ _TOCOL(array, [ignore], [scan_by_column])_ -The `TOROW` function returns the array in a single row. +The `TOROW` function transforms an array into a single row. @@ -1473,11 +1477,11 @@ _TOROW(array, [ignore], [scan_by_column])_ -* array: The array or reference to return as a row. +* array: The array to convert into a row. -* [ignore] (Optional): Whether to ignore certain types of values. By default, no values are ignored. Specify one of the following: +* [ignore] (Optional): Specifies which values to ignore: @@ -1485,19 +1489,19 @@ _TOROW(array, [ignore], [scan_by_column])_ - * 1: Ignore blanks + * 1: Ignore blanks. - * 2: Ignore errors + * 2: Ignore errors. - * 3: Ignore blanks and errors + * 3: Ignore blanks and errors. -* [scan_by_column] (Optional): Scan the array by column. By default, the array is scanned by row. Scanning determines whether the values are ordered by row or by column. +* [scan_by_column] (Optional): If `TRUE`, scans by column. @@ -1505,15 +1509,15 @@ _TOROW(array, [ignore], [scan_by_column])_ -* If scan_by_column is omitted or `FALSE`, the array is scanned by row; If `TRUE`, the array is scanned by column. +* The function will return all values in a single row, even if the original array was multidimensional. -* `TOROW` returns a `#VALUE!` error when an array constant contains one or more numbers that are not a whole number. +* If [scan_by_column] is set to `TRUE`, the function will scan the array by column; otherwise, it defaults to scanning by row. -* `TOROW` returns a `#NUM!` error when the array is too large. +* If an array contains non-integer values, the function returns a `#VALUE!` error. @@ -1521,7 +1525,7 @@ _TOROW(array, [ignore], [scan_by_column])_ -The `CHOOSECOLS` function returns the specified columns from an array. +The `CHOOSECOLS` function returns specified columns from an array. @@ -1537,29 +1541,32 @@ _CHOOSECOLS(array, col_num1, [col_num2], …)_ -* array: The array containing the columns to be returned in the new array. +* array: The array containing columns to be selected. -* col_num1: The first column to be returned. +* col_num1: The index of the first column to return. -* [col_num2] (Optional): Additional columns to be returned. +* [col_num2] (Optional): Additional columns to return. **Remarks:** -* `CHOOSECOLS` returns a `#VALUE!` error if the absolute value of any of the col_num arguments is zero or exceeds the number of columns in the array. +* If any [col_num] is zero or exceeds the total number of columns, a `#VALUE!` error is returned. + +* The function is useful for extracting only certain columns from a large dataset. + ## CHOOSEROWS -The `CHOOSEROWS` function returns the specified rows from an array. +The `CHOOSEROWS` function returns specified rows from an array. **Syntax:** @@ -1571,19 +1578,23 @@ _CHOOSEROWS(array, row_num1, [row_num2], …)_ **where:** -* array: The array containing the rows to be returned in the new array. +* array: The array containing the rows to be selected. -* row_num1: The first row number to be returned. +* row_num1: The index of the first row to return. -* [row_num2] (Optional): Additional row numbers to be returned. +* [row_num2] (Optional): Additional rows to return. **Remarks:** -`CHOOSEROWS` returns a `#VALUE!` error if the absolute value of any of the row_num arguments is zero or exceeds the number of rows in the array. +* A `#VALUE!` error occurs if any [row_num] exceeds the number of rows or is zero. + + + +* The function is useful for extracting specific rows from a dataset. @@ -1591,7 +1602,7 @@ _CHOOSEROWS(array, row_num1, [row_num2], …)_ -The `SEQUENCE` function allows you to generate a list of sequential numbers in an array, such as 1, 2, 3, 4. +The `SEQUENCE` function generates a sequence of numbers in an array. @@ -1607,34 +1618,35 @@ _SEQUENCE(rows, [columns], [start], [step])_ -* rows: The number of rows to return. Required. +* rows: The number of rows for the sequence. + +* [columns] (Optional): The number of columns. -* [columns] (Optional): The number of columns to return. +* [start] (Optional): The starting number. -* [start] (Optional): The first number in the sequence. +* [step] (Optional): The increment for each number. -* [step] (Optional): The amount to increment each subsequent value in the array. **Remarks:** -* Any missing optional arguments will default to 1. If you omit the rows argument, you must provide at least one other argument. +* Defaults to 1 for all omitted optional arguments. If no start or step values are specified, the sequence starts at 1 and increments by 1. -* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. In the example above, the array for our SEQUENCE formula is range C1:G4. +* The function spills the result into adjacent cells when it generates the array. -* The `SEQUENCE` function will return an array, which will spill if it's the final result of a formula. +* `SEQUENCE` can create multi-dimensional arrays by specifying both rows and columns. @@ -1642,7 +1654,7 @@ _SEQUENCE(rows, [columns], [start], [step])_ -The `TEXTSPLIT` function splits text strings by using column and row delimiters. +The `TEXTSPLIT` function splits text into arrays based on delimiters. @@ -1658,27 +1670,27 @@ _TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [ -* text: The text you want to split. +* text: The input text to split. -* col_delimiter: The text that marks the point where to spill the text across columns. +* col_delimiter: The delimiter to split the text into columns. -* [row_delimiter] (Optional): The text that marks the point where to spill the text down rows. +* [row_delimiter] (Optional): The delimiter to split the text into rows. -* [ignore_empty] (Optional): Specify `TRUE` to ignore consecutive delimiters. Defaults to `FALSE`, which creates an empty cell. +* [ignore_empty] (Optional): If `TRUE`, ignores consecutive delimiters. Defaults to `FALSE`. -* [match_mode] (Optional): Specify 1 to perform a case-insensitive match. Defaults to 0, which does a case-sensitive match. +* [match_mode] (Optional): If 1, performs a case-insensitive match. Defaults to 0 (case-sensitive). -* [pad_with] (Optional): The value with which to pad the result. The default is `#N/A`. +* [pad_with] (Optional): The value to use for padding missing elements. Defaults to `#N/A`. @@ -1686,7 +1698,15 @@ _TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [ -* If there is more than one delimiter, then an array constant must be used. For example, to split by both a comma and a period, use _TEXTSPLIT(A1,{",","."})_. +* If no [row_delimiter] is provided, the function will only split by columns. You can use multiple delimiters by specifying an array of delimiters. + + + +* The [ignore_empty] option allows consecutive delimiters to be ignored, which is useful when parsing text that contains multiple delimiters. + + + +* The [pad_with] argument is used to fill in empty cells when the result array is not rectangular. @@ -1714,11 +1734,11 @@ _TAKE(array, rows, [columns])_ -* rows: The number of rows to take. A negative value takes from the end of the array. +* rows: The number of rows to take. A negative value takes rows from the end of the array. -* [columns] (Optional): The number of columns to take. A negative value takes from the end of the array. +* [columns] (Optional): The number of columns to take. A negative value takes columns from the end of the array. @@ -1726,11 +1746,15 @@ _TAKE(array, rows, [columns])_ -* `TAKE` returns a `#CALC!` error to indicate an empty array when either rows or columns is 0. +* `TAKE` returns a `#CALC!` error if either rows or columns are set to 0, as this results in an empty array. + + +* If the specified array is too large, `TAKE` returns a `#NUM!` error. -* `TAKE` returns a `#NUM!` error when the array is too large. + +* The function allows easy extraction of portions of data, especially for summarizing or splitting tables. @@ -1738,7 +1762,7 @@ _TAKE(array, rows, [columns])_ -The `DROP` function excludes a specified number of rows or columns from the start or end of an array. You might find this function useful to remove headers and footers in an Excel report to return only the data. +The `DROP` function excludes a specified number of rows or columns from the start or end of an array. This function is useful for removing headers, footers, or sections of data in an array. @@ -1752,6 +1776,7 @@ _DROP(array, rows, [columns])_ **where:** +Manivannan-E marked this conversation as resolved. * array: The array from which to drop rows or columns. @@ -1762,7 +1787,7 @@ _DROP(array, rows, [columns])_ -* [columns] (Optional): The number of columns to exclude. A negative value drops from the end of the array. +* [columns] (Optional): The number of columns to drop. A negative value drops columns from the end. @@ -1770,19 +1795,22 @@ _DROP(array, rows, [columns])_ -* `DROP` returns a `#CALC!` error to indicate an empty array when rows or columns is 0. +* A `#CALC!` error is returned if rows or columns are set to 0, creating an empty array. + +* If the array exceeds the allowed size limit, `DROP` returns a `#NUM!` error. -* `DROP` returns a `#NUM!` error when the array is too large. +* The function helps to clean up datasets, such as removing unnecessary columns or rows before analysis. + ## EXPAND -The `EXPAND` function expands or pads an array to specified row and column dimensions. +The `EXPAND` function expands or pads an array to specified row and column. @@ -1802,15 +1830,15 @@ _EXPAND(array, rows, [columns], [pad_with])_ -* rows: The number of rows in the expanded array. If missing, rows will not be expanded. +* rows: The number of rows in the expanded array. -* [columns] (Optional): The number of columns in the expanded array. If missing, columns will not be expanded. +* [columns] (Optional): The number of columns in the expanded array. -* [pad_with] (Optional): The value with which to pad. The default is `#N/A`. +* [pad_with] (Optional): The value to pad with if the array is smaller than the target size. Defaults to `#N/A`. @@ -1818,23 +1846,15 @@ _EXPAND(array, rows, [columns], [pad_with])_ -* If rows isn’t provided or is empty, the default value is the number of rows in the array argument. - - - -* If columns isn’t provided or is empty, the default value is the number of columns in the array argument. - +* If the rows or columns argument is less than the original array's dimensions, `EXPAND` will return a `#VALUE!` error. -* `EXPAND` returns a `#VALUE!` error when the rows or columns argument is less than the rows or columns in the array argument. +* Padded cells use the [pad_with] argument; if omitted, it defaults to `#N/A`. -* `EXPAND` returns a `#N/A!` error in padded cells if pad_with is not provided. - - -* `EXPAND` returns a `#NUM!` error when the array is too large. +* Useful for filling or aligning datasets to match specific table structures. @@ -1842,7 +1862,7 @@ _EXPAND(array, rows, [columns], [pad_with])_ -The `WRAPROWS` function wraps the provided row or column of values by rows after a specified number of elements to form a new array. +The `WRAPROWS` function wraps a one-dimensional vector into rows after a specified number of elements to form a new array. **Syntax:** @@ -1857,15 +1877,15 @@ _WRAPROWS(vector, wrap_count, [pad_with])_ -* vector: The vector or reference to wrap. +* vector: The row or column of values to wrap. -* wrap_count: The maximum number of values for each row. +* wrap_count: The maximum number of elements in each row. -* [pad_with] (Optional): The value with which to pad. The default is `#N/A`. +* [pad_with] (Optional): The value used to fill in any remaining cells if the array cannot be evenly divided. Defaults to `#N/A`. @@ -1873,29 +1893,26 @@ _WRAPROWS(vector, wrap_count, [pad_with])_ -* The elements of the vector are placed into a 2-dimensional array by row. Each row has wrap_count elements. The row is padded with pad_with if there are insufficient elements to fill it. - - +* If the [wrap_count] is greater than the length of the vector, the vector is returned in a single row. -* If wrap_count is greater than or equal to the number of elements in vector, then the vector is simply returned in a single row. +* The function returns a `#VALUE!` error if the input is not a one-dimensional array. -* `WRAPROWS` returns a `#VALUE!` error when vector is not a one-dimensional array. -* `WRAPROWS` returns a `#NUM!` error when wrap_count is less than 1. +* If [wrap_count] is less than 1, a `#NUM!` error occurs. -* `WRAPROWS` returns a `#N/A!` error for each cell in the return array that has no results. +* Cells that cannot be filled are assigned `#N/A`, unless otherwise specified with [pad_with]. ## WRAPCOLS -The `WRAPCOLS` function wraps the provided row or column of values by columns after a specified number of elements to form a new array. +The `WRAPCOLS` function wraps a one-dimensional vector into columns after a specified number of elements to form a new array. @@ -1911,15 +1928,15 @@ _WRAPCOLS(vector, wrap_count, [pad_with])_ -* vector: The vector or reference to wrap. +* vector: The row or column of values to wrap. -* wrap_count: The maximum number of values for each column. +* wrap_count: The maximum number of elements in each column. -* [pad_with] (Optional): The value with which to pad. The default is `#N/A`. +* [pad_with] (Optional): The value used to fill in any remaining cells if the array cannot be evenly divided. Defaults to `#N/A`. @@ -1927,23 +1944,17 @@ _WRAPCOLS(vector, wrap_count, [pad_with])_ -* The elements of the vector are placed into a 2-dimensional array by column. Each column has wrap_count elements. The column is padded with pad_with if there are insufficient elements to fill it. - - - -* If wrap_count is greater than or equal to the number of elements in vector, then the vector is simply returned in a single column. - +* If [wrap_count] exceeds the length of the vector, the vector is returned in a single column. -* `WRAPCOLS` returns a `#VALUE!` error when vector is not a one-dimensional array. +* If the vector is not a one-dimensional array, a `#VALUE!` error is returned. +* A `#NUM!` error occurs if [wrap_count] is less than 1. -* `WRAPCOLS` returns a `#NUM!` error when wrap_count is less than 1. - -* `WRAPCOLS` returns a `#N/A!` error for each cell in the return array that has no results. +* Empty cells in the new array are filled with `#N/A` unless specified otherwise. @@ -1951,8 +1962,7 @@ _WRAPCOLS(vector, wrap_count, [pad_with])_ -The `SORT` function sorts the contents of a range or array. - +The `SORT` function sorts the contents of an array in either ascending or descending order. **Syntax:** @@ -1967,19 +1977,19 @@ _SORT(array, [sort_index], [sort_order], [by_col])_ -* array: The range or array to sort. Required. +* array: The array or range to sort. -* [sort_index] (Optional): A number indicating the row or column to sort by. +* [sort_index] (Optional): The index (row or column number) to sort by. Defaults to the first row/column. -* [sort_order] (Optional): A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order. +* [sort_order] (Optional): 1 for ascending (default), -1 for descending. -* [by_col] (Optional): A logical value indicating the desired sort direction; `FALSE` to sort by row (default), `TRUE` to sort by column. +* [by_col] (Optional): `FALSE` (default) to sort by rows, or `TRUE` to sort by columns. @@ -1987,27 +1997,15 @@ _SORT(array, [sort_index], [sort_order], [by_col])_ -* When sort_index is not provided, row1/col1 will be presumed. - - - -* When sort_order is not provided, ascending order will be presumed. - +* When [sort_index] or [sort_order] is omitted, Excel defaults to sorting the first row or column in ascending order. -* By default, `SORT` will sort by row, and will only sort by column when by_col is `TRUE`. When by_col is `FALSE` or missing, `SORT will sort by row. +* `SORT` automatically spills the result into adjacent cells, making it convenient for dynamic arrays. -* The `SORT` function is provided to sort data in an array. If you want to sort data in the grid, it's better to use the `SORTBY` function, as it is more flexible. - - -* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. - - - -* The `SORT` function will return an array, which will spill if it's the final result of a formula. +* Use the `SORTBY` function when you need more flexible sorting based on multiple criteria. @@ -2015,7 +2013,7 @@ _SORT(array, [sort_index], [sort_order], [by_col])_ -The `SORTBY` function sorts the contents of a range or array based on the values in a corresponding range or array. +The `SORTBY` function sorts an array based on values in a separate corresponding array or range. @@ -2031,35 +2029,39 @@ _SORTBY(array, by_array1, [sort_order1], [by_array2, sort_order2], …)_ -* array: The array or range to sort. +* array: The array to sort. + +* by_array1: The array or range to sort by. -* by_array1: The array or range to sort on. +* [sort_order1] (Optional): 1 for ascending (default), -1 for descending. -* [sort_order1] (Optional): The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending. +* [by_array2], [sort_order2] (Optional): Additional arrays and their sort orders, if needed. -* [by_array2] (Optional): The array or range to sort on. +**Remarks:** -* [sort_order2] (Optional): The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending. +* The function allows sorting on multiple criteria. -**Remarks:** + + +* Results are returned in a dynamic array that spills into adjacent cells. -* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. +* If no sort order is specified, Excel defaults to ascending order. -* The `SORTBY` function will return an array, which will spill if it's the final result of a formula. +* Unlike `SORT`, `SORTBY` enables sorting based on multiple, unrelated criteria or arrays. @@ -2067,7 +2069,7 @@ _SORTBY(array, by_array1, [sort_order1], [by_array2, sort_order2], …)_ -The `FILTER` function allows you to filter a range of data based on criteria you define. +The `FILTER` function returns an array of values filtered based on criteria you define. @@ -2087,11 +2089,11 @@ _FILTER(array, include, [if_empty])_ -* include: A Boolean array whose height or width is the same as the array. +* include: A Boolean array (same size as array) that indicates which values to keep. -* [if_empty] (Optional): The value to return if all values in the included array are empty (filter returns nothing). +* [if_empty] (Optional): The value to return if no results match the criteria. Defaults to a `#CALC!` error. @@ -2099,16 +2101,12 @@ _FILTER(array, include, [if_empty])_ -* An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. - - - -* The `FILTER` function will return an array, which will spill if it's the final result of a formula. +* The `FILTER` function automatically spills the results into adjacent cells. -* If your dataset has the potential of returning an empty value, then use the 3rd argument (`[if_empty]`). Otherwise, a `#CALC!` error will result, as Excel does not currently support empty arrays. +* If no matches are found, and [if_empty] is not defined, Excel returns a `#CALC!` error. -* If any value of the include argument is an error (`#N/A`, `#VALUE`, etc.) or cannot be converted to a Boolean, the `FILTER` function will return an error. \ No newline at end of file +* `FILTER` will return an error if the include array is not Boolean, or if it contains errors such as `#N/A` or `#VALUE!`. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md index 6cfb5d9da..1945f63b1 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md @@ -2573,4 +2573,4 @@ _LINEST(known_y's, [known_x's], [const], [stats]))_ * If const is `FALSE`, b is set equal to 0 -* stats (Optional). This is a logical value specifying whether to return additional regression statistics. \ No newline at end of file +* stats (Optional). This is a logical value specifying whether to return additional regression statistics. From 4bd4a09dca787117efef84eee7b64fc567df98ab Mon Sep 17 00:00:00 2001 From: ushasundarajan Date: Mon, 23 Sep 2024 17:24:19 +0530 Subject: [PATCH 5/5] removed redundant lines --- .../Supported-Formulas/Math-Trigonometry.md | 9 +++++---- .../Supported-Formulas/Text-Formulas.md | 20 +++++++++++++++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md index 91fafccec..ef01cd857 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md @@ -2532,9 +2532,6 @@ _SERIESSUM(x, n, m, coefficients)_ -* The argument is non-numeric, it returns the `#VALUE!` error message. - - * The argument is non-numeric, it returns the `#VALUE!` error message. @@ -2602,6 +2599,7 @@ _XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], * [search_mode] (Optional): Specifies the search order: + * 1 - Search from the first item (default). @@ -2643,7 +2641,6 @@ _XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], ## XMATCH -Manivannan-E marked this conversation as resolved. @@ -2801,6 +2798,7 @@ _FLOOR.PRECISE(number, [significance])_ * significance (Optional): The multiple to which the number should be rounded. Defaults to 1. + **Remarks:** @@ -2860,6 +2858,7 @@ _ISO.CEILING(number, [significance])_ ## CEILING.PRECISE + The `CEILING.PRECISE` function rounds a number up to the nearest integer or a specified multiple of significance. Like ISO.CEILING, it always rounds up regardless of whether the number is positive or negative. If the number or significance is zero, it returns zero. @@ -2887,6 +2886,7 @@ _CEILING.PRECISE(number, [significance])_ **Remarks:** + * `CEILING.PRECISE` uses the absolute value of the multiple, ensuring that the function rounds up regardless of the signs of the number or significance. @@ -2922,6 +2922,7 @@ _HSTACK(array1, [array2], ...)_ **Remarks:** + * `HSTACK` returns an array where each input array is appended in a column-wise fashion. diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md index 03365a8eb..6df836477 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md @@ -1235,7 +1235,6 @@ _TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_f - ## TEXTBEFORE @@ -1335,6 +1334,7 @@ _VALUETOTEXT(value, [format])_ * 1: Strict format with escape characters for formulas. + **Remarks:** @@ -1354,6 +1354,7 @@ _VALUETOTEXT(value, [format])_ The `ARRAYTOTEXT` function function converts an array into text. + **Syntax:** @@ -1556,6 +1557,7 @@ _CHOOSECOLS(array, col_num1, [col_num2], …)_ **Remarks:** + * If any [col_num] is zero or exceeds the total number of columns, a `#VALUE!` error is returned. @@ -1563,33 +1565,43 @@ _CHOOSECOLS(array, col_num1, [col_num2], …)_ * The function is useful for extracting only certain columns from a large dataset. + ## CHOOSEROWS + The `CHOOSEROWS` function returns specified rows from an array. + **Syntax:** + _CHOOSEROWS(array, row_num1, [row_num2], …)_ + **where:** + * array: The array containing the rows to be selected. + * row_num1: The index of the first row to return. + * [row_num2] (Optional): Additional rows to return. + **Remarks:** + * A `#VALUE!` error occurs if any [row_num] exceeds the number of rows or is zero. @@ -1776,7 +1788,6 @@ _DROP(array, rows, [columns])_ **where:** -Manivannan-E marked this conversation as resolved. * array: The array from which to drop rows or columns. @@ -1806,6 +1817,7 @@ Manivannan-E marked this conversation as resolved. * The function helps to clean up datasets, such as removing unnecessary columns or rows before analysis. + ## EXPAND @@ -1908,6 +1920,7 @@ _WRAPROWS(vector, wrap_count, [pad_with])_ * Cells that cannot be filled are assigned `#N/A`, unless otherwise specified with [pad_with]. + ## WRAPCOLS @@ -1947,9 +1960,11 @@ _WRAPCOLS(vector, wrap_count, [pad_with])_ * If [wrap_count] exceeds the length of the vector, the vector is returned in a single column. + * If the vector is not a one-dimensional array, a `#VALUE!` error is returned. + * A `#NUM!` error occurs if [wrap_count] is less than 1. @@ -1965,6 +1980,7 @@ _WRAPCOLS(vector, wrap_count, [pad_with])_ The `SORT` function sorts the contents of an array in either ascending or descending order. + **Syntax:**