Issue 104241 - ODFF: LOOKUP, MATCH, VLOOKUP, HLOOKUP in a range lookup should not find last numeric value if queried for string
Summary: ODFF: LOOKUP, MATCH, VLOOKUP, HLOOKUP in a range lookup should not find last ...
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: recent-trunk
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: ms_interoperability
Depends on:
Blocks:
 
Reported: 2009-08-14 21:33 UTC by ooo
Modified: 2017-05-20 11:11 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
testcase (8.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-08-14 21:35 UTC, ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ooo 2009-08-14 21:33:13 UTC
LOOKUP, MATCH, VLOOKUP and HLOOKUP in a sorted range lookup are defined to
return the last value <= query. However, if the query is string, currently the
last numeric value is returned if no string <= query is present in the range.
Instead, an error is to be returned, as is defined in ODFF/OpenFormula and does
Excel.

For example, looking up "a" in the sequence {1,3,"b","d"} currently returns a
match for 3; it should not, but return #N/A instead.
Comment 1 ooo 2009-08-14 21:35:46 UTC
Created attachment 64176 [details]
testcase
Comment 2 mhatheoo 2009-08-15 16:33:25 UTC
oops - hope this was not ment serious, changing sorting-paradimas might be done
somewhere else. 
However, this never could be a defect, nor is this related to the subcomponent
programming.

If this is the pledge for having a (NEW) parameter in these features for finding
 exact match, which returns a "N/A" if it does not exist, that is okay, and
welcome. But touching the default behaviour is not welcome. 

Bytheway: The example is not that serious, as it consists only of descrete
values of strings. 
But very offen these functions are used to group values, like group of "1 2 3 4
5" and "what is the indexed value for 1,25" 

And bytheway: since years I worry about the wrong searchorder in all these
functions: Example: Having a telephonebook and looking for "B" gives should give
the first of the B's, not the last of the As like in OO.o, but that is another story

Martin
Comment 3 mhatheoo 2009-08-16 18:25:59 UTC
=>er

well, I reread your issue, and right now I am uncertain about your complaint,
probably we two mean the same, but ...
Your example consists of a data-type-mix, which is normally unwanted in a
situation you describe. 
So, would you mind to explain it again  

Martin
Comment 4 ooo 2009-08-17 11:31:17 UTC
@mhatheoo:
> Your example consists of a data-type-mix, which is normally unwanted in
> a situation you describe. 

This issue is _only_ about mixed sorted data types. Querying for
a string in such mixed range should not return the last numeric value if
no string less or equal than the query was found. Take a look at the
attached testcase document, querying for "a" should return #N/A.
Comment 5 ooo 2009-09-02 15:19:04 UTC
Won't be able to change this in time for OOo3.2 branch off date. Retargeting to
OOo3.3
Comment 6 Martin Hollmichel 2011-03-15 12:51:02 UTC
set target to 3.x since not release relevant for 3.4.
Comment 7 Marcus 2017-05-20 11:11:10 UTC
Reset assigne to the default "issues@openoffice.apache.org".