Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


At 13:56 27/11/2015 -0500, Edwar Cifuentes wrote:
On 11/27/2015 06:11 AM, Brian Barker wrote:
It's Boolean expression, giving the result TRUE or FALSE. It's testing the individual cells in the range A1:C2 to determine whether they are equal to the maximum value of that range. It may seem strange to be able to write such an expression for an entire range instead of for individual cells, but that is the power of array formulae.

I see. I entered =(A1:C2 = MAX(A1:C2)) in a separate cell and it generated a 2x3 true/false table corresponding to the one I created. The bottom right cell returned TRUE because it corresponds to 6, the highest value in my original table.

=ROW(A1:C2) generates a one column table with numbered rows.

Now, the whole first argument of the ADDRESS function is =(MAX((A1:C2=MAX(A1:C2))*ROW(A1:C2))), which looks like "multiplying" a table by another table. What does it really mean? does it kind of superimpose the two tables and return the highest value? does it multiply the highest value from table 1 with the highest from table 2? or what does it exactly do?

(It's not my formula, in fact, but ...) the multiplication is between the respective Boolean values and the relevant row numbers. This relies on the fact that Calc stores TRUE as one and FALSE as zero. So the FALSE (zero) values - for cells with smaller values - suppress their row values, and the TRUE (one) value - for the cell containing the largest value - preserves the row value for that cell. And that one remaining value must now be found by MAX() as the largest. A similar part of the original formula extracts the column number (1 for column A, 2 for column B, etc.) and the ADDRESS() function combines these two numbers to form the address of the required cell in the form "C2" (or whatever).

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.