Hi Lvyue, On Tuesday, 2007-12-11 10:35:18 +0800, Lvyue wrote:
> I want to ask if there is no numeric value, but string value in a cell, range > or matrix, should MIN/MAX return 0? Yes. Only if there are no other numeric values that would result in a different min/max, of course. Short definition: If there is no numeric value return 0, else return min/max of numeric values. > If that, then what is the difference between MIN/MAX and MINA/MAXA? MIN/MAX would return 0 only if no other numeric values are encountered. For MINA/MAXA, a string value does always count as zero, so if we have A1: <empty> A2: "string" A3: 3 =MIN(A1:A3) => 3 =MINA(A1:A3) => 0 =MIN(A1:A2) => 0 // new behavior, currently results in Err:502 =MINA(A1:A2) => 0 =MIN(A1) => 0 // new behavior, currently results in Err:502 =MINA(A1) => 0 // new behavior, currently results in Err:502 Note that MIN(A1:A3) is identical to MIN(A1;A2;A3) > I think one parm can be considered empty only if there is not any value, > neither numeric nor string. As MIN/MAX act only on numeric values and ignore strings, "emptiness" is already fulfilled if in all arguments no numeric value was encountered. For MINA/MAXA of course it is the condition of neither numeric nor string. > As I think it that way, I count every matrix element to determine wether it > is empty. > Besides, nEmpty... are used for counting the number of parms, not the number > of cells. > If I misunderstand your meaning, please explain it again. Matching conditions of emptiness against the number of parameters passed is not needed. The minimum/maximum is determined over all parameters, not separately, so emptiness is also a "over all" condition. Hope that helps. Eike -- OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer. SunSign 0x87F8D412 : 2F58 5236 DB02 F335 8304 7D6C 65C9 F9B5 87F8 D412 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't send personal mail to the [EMAIL PROTECTED] account, which I use for mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] Thanks.
pgp62SCVj6xQS.pgp
Description: PGP signature