Talk:Documentation/Calc Functions/MATCH

SF Comments

 * (1) Summary. Do the two sentences of this section make independent points, or is the second just repetition of the first? Is the following a better summary - “Determines the position of a search item in a single row or column range of cells.”?
 * (2) Syntax. Why is “Type” in single quotation marks?
 * (3) Returns. Maybe replace the verbose “positive whole number ranging from 1” with “positive integer”. Also, I don’t like covering all complexities in this statement – I feel that “which is…” could be followed more simply by “… the position of the searched for item in the given range of cells”.
 * (4) Arguments, Search Criterion. Which types of values can be entered in this argument (either directly or via a referenced cell? Presumably, text strings, numbers, and logical values. Also note that a string may contain regular expressions or wildcards.
 * (5) Arguments, Lookup Array. The statements given seem inadequate and I do not understand the second sentence. In summary, this argument is a single row or single column range of cells. It may be a named range or a database range; in these cases, the range must specify one single row or single column range (bearing in mind that named ranges can comprise multiple ranges of cells). It may also be a constant array (values within {} brackets).
 * (6) Arguments, Type. Presumably either a number or a reference to a cell containing that number. As far as I can tell, the code checks for <0, =0 and >0. Please experiment to verify this but I think we should reflect on the wiki what the code really does. I don’t understand the text which talks about the first column being sorted – can there be more than one column: what about if it’s a row range of cells? Please delete “This corresponds to the same function in Microsoft Excel” as not relevant. Please expand on what is meant by “if enabled in calculation options”. Please consider re-organising the meanings of the Type options into an easy-to-read table.
 * (7) Arguments, 1st bullet. “Text”, “Number” and “Error” do not need to start with upper case letters.
 * (8) Arguments, 2nd bullet. Change “value is equal to SearchCriterion exists” to “match is found”. “Error” does not need to start with an upper-case letter.
 * (9) Arguments, possible extra bullet(s). Should there be a statement to reflect what happens if, when Type > 0, the value searched for is smaller than the first element in LookupArray? (#N/A error). Similarly, what happens when Type < 0 and the value searched for is smaller than the last element in LookupArray?
 * (10) Arguments, possible extra bullet. What happens if you set up a wildcard or regular expression match and Type <> 0?
 * (11) Arguments, possible extra bullet. What happens for Type <> 0 if the elements in LookupArray are not sorted in the expected order?
 * (12) Arguments, possible extra bullet. What happens if you try to pass a two-dimensional cell range as the LookupArray argument?
 * (13) Additional details, 1st bullet. “Text” does not need to begin with an upper-case letter.
 * (14) Additional details, 2nd bullet. “Text” does not need to begin with an upper-case letter. I am not sure we need to spell out what it means to sort text in ascending order. Since Calc normally treats TRUE and FALSE logical values as 1 and 0 respectively, I am not sure we need to make a statement about their order here.
 * (15) Additional details, 3rd bullet. Suggest deleting “and Text before Logicals. Evaluators without a separate Logical type may include a Logical as a Number.”.
 * (16) Additional details, 4th bullet. Delete – inappropriate techie stuff!
 * (17) Examples, general. Please include examples for wildcards and regular expressions. Also consider an example of passing LookupArray as a row cell range.
 * (18) Examples, general. I find it a little confusing that column A is not referenced in any of the formulas. Maybe you could re-order so that column A is sorted in descending order and use it when the Type argument is set to -1?
 * (19) Examples, general. Please re-check grammar in Description entries.

--Stevefanning (talk) 2020-12-21T21:00:41 (UTC)