The main table contains a list of Lookups to determine a value for a particular part. All Cell formats have been set to TEXT In this example, Cell B264 Contains 'TSSOP-48' Cell C264 contains =LOOKUP(B264, Packages.$A$2:$B$208) The Packages Table contains Cell Ref A, B below 'TSSOP-16', 1 'TSSOP14', 17 'TSSOP20', 17 'TSSOP-48', 17 The Lookup function should return '17' but returns '1' suggesting that it's not searching for an exact text match.
Created attachment 186745 [details] Small sample file Reproduced in Version: 7.5.2.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 4:7.5.2~rc2-0ubuntu0.22.10.1~lo1 Calc: threaded Adding the "-" character makes it stop working. If you remove the "-" it works.
This is not a bug. As explained in the LOOKUP function help [1]: > the search vector for the LOOKUP must be sorted ascending, otherwise the search > will not return any usable results. > > If LOOKUP cannot find the search criterion, it matches the largest value in the > search vector that is less than or equal to the search criterion. [1] https://help.libreoffice.org/latest/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3159273
(In reply to Mike Kaganski from comment #2) > This is not a bug. Thanks for the clarification.