https://issues.apache.org/bugzilla/show_bug.cgi?id=52818

--- Comment #3 from rubin wang <[email protected]> 2012-03-05 08:37:34 UTC ---
Created attachment 28418
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28418
Rank.java

Implementation of RANK(ARG1, ARG2, ARG3). Based on the description in
http://office.microsoft.com/en-us/excel-help/rank-function-HP010062535.aspx?CTT=5&origin=HA010277524.

The algorithm is as follows:

1) throw EvaluationException(ErrorEval.NUM_ERROR) if either ARG0 does not
contain a number or ARG3 does not contain 0 or 1.

2) set rank=0, search each cell in the range specified by ARG2, if the cell
contains a number greater than ARG0 and ARG3 is 0, or lower than ARG0 and ARG3
is 1, then rank++;  If the cell does not contain a number, then ignore this
cell.

3) return the value of rank

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to