Created attachment 198889 [details] Example of incorrect operation Incorrect operation. If the function is to find unique occurrences in a range or matrix, and the range or matrix contain identical entries, the function returns the entire matrix or range of these entries instead of a single occurrence. Example in the attached file: Incorrect result construction. A function validated in a single cell creates a result area or result matrix adjusted to present the result that concerns the current state of the data. If the source data changes and the number of unique elements changes as well, the already created result range does not change. If there are fewer unique elements, the unused cells of the result range contain #N/A, and if there are more of these elements, only as many results will be shown as can be entered into the created result area. Hence, I postulate the following: If the author of the formula does not first select the range in which the function is to return results, the function should generate the dimension of the output area consistent with the dimension of the area of the analyzed data. Unused cells of this area should contain a string of characters given as an additional (optional) argument to the function and #N/A should be returned if this argument is omitted (as e.g. in the XLOOKUP() function).
Topic: Incorrect result construction. The fact, that the result area does not adapt to changes in the source range, is a missing feature of LibreOffice. The feature is called "dynamic array" in Excel. The request for this feature is in bug 127808. Topic: Incorrect operation. I do not understand whether and how it is different from the other topic.
(In reply to Regina Henschel from comment #1) > Topic: Incorrect operation. > > I do not understand whether and how it is different from the other topic. In line 1 we have the names of 10 different fruits, so the UNIQUE function's output line also returns 10 names. In line 2, the name of one fruit is repeated ten times, but the UNIQUE function's output does not return one name, but repeats it ten times. The third line shows that it is enough for the list to contain at least one different name, and the UNIQUE function will return only as many names as are actually unique.
it all depends on how many cells you select before you add the formula =UNIQUE(B4:K4;1). if you select the range B12:K12 and then you add the formula, then it will create one array per cell, which is the expected behaviour. For the problem described in comment 1, it's already reported in bug 165065 *** This bug has been marked as a duplicate of bug 165065 ***
I mean, it's the expected behaviour at the moment, but yep, the root cause of the problem is the dynamic arrays not being implemented in LibreOffice at the moment, so it's correct to close this as a duplicated of bug 165065