Bug 106342 - Function LOOKUP don't work correctly with symbols or numbers and text
Summary: Function LOOKUP don't work correctly with symbols or numbers and text
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL: https://www.dropbox.com/s/cn7d7vyzsrn...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-05 19:40 UTC by JCS_79
Modified: 2017-03-05 22:53 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JCS_79 2017-03-05 19:40:09 UTC
Description:
When I need a text value that start with number or symbol ("1,2 Butadieno" or "(1) Buteno") the function reply with "#N/D"
I put an URL with a file example https://www.dropbox.com/s/cn7d7vyzsrnx8sb/error.ods?dl=0

Actual Results:  
the function reply with "#N/D"

Expected Results:
the function should reply with the correct value


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Comment 1 m_a_riosv 2017-03-05 22:53:36 UTC
There two issues with your file,
The data on the searched vector must be sorted.
LOOKUP() use regular experssions, so you must deactivated it because the comma is part of the regular expressions.
To avoid the issue with regular expressions:
Menu/Tools/Options/LibreOffice Calc/Calculate - No wildcards or regex in formulas

To avoid the sort issue you can use the MATCH() function in combination with INDEX():
B2: =INDEX($Productos.$A$2:$A$5000;MATCH(B2;$Productos.$B$2:$B$5000;0))

https://help.libreoffice.org/Calc/Spreadsheet_Functions#LOOKUP
https://help.libreoffice.org/Calc/Spreadsheet_Functions#MATCH

There is no bug, please if you are not agree, reopen it.