Bug 70420

Summary: RTL: VLOOKUP() broken
Product: LibreOffice Reporter: Grimeton <grimeton>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: miguelangelrv
Priority: medium    
Version: 4.1.1.2 release   
Hardware: Other   
OS: macOS (All)   
Whiteboard: BSA
Crash report or crash signature: Regression By:
Attachments: Said file containing said sheets

Description Grimeton 2013-10-13 09:34:51 UTC
Created attachment 87545 [details]
Said file containing said sheets

Problem description: 

Hello,

the VLOOKUP() function is totally broken. It finds some words while it can't find others that are there and clearly visible.

Find attached a file that shows the problem.


Steps to reproduce:

1. Open the attached file.

2. On the sheet called "Tabelle1" you can see different pop down menues in column "H". The values from in rows five to 15 are taken from the "Basisdaten" sheet cell range B115:B122.

3. In the "G" column you can see a formula that uses the VLOOKUP() function to lookup the the value needed for the calculation. The data is looked up in the cell range of B115:B122 from the "Basisdaten" sheet, and the function is set to return "column" number nine. If you select "Panzerreiter" it returns the right value but if you select "Lanzenreiter" it just seems to return nothing which is wrong. It should return 22. As the valid data fields are the same that are used as in the array looked at by the VLOOKUP() function it should be able to find the names and the corresponding data.

4. The same thing happens in the "H" column from rows 18 to 38, but the lookup valid data is taken from a different column than the data the VLOOKUP() function uses later. In fact those values are just copied over to get a cell range that doesn't contain invalid values and isn't interrupted. Again you don't get anything useful back.

I can see the same problems with other sheets and other lookups.

Current behavior:

Can't find the looked up data.

Expected behavior:

Return the values found by looking up the data.

KR,

Oliver


Operating System: Mac OS X
Version: 4.1.1.2 release
Comment 1 m_a_riosv 2013-10-13 15:41:32 UTC
Hi Grimeton, thanks for reporting.

In the VLOOKUP() is omitted the last parameter what is essential in an unsorted list.
In G5: =REDONDEAR.MAS(($B5+$D5+$F5)/BUSCARV($H5;Basisdaten.$B$115:$J$122;9;0))
works fine for me.
Please read in the help about the function.

Changed status to notabug, if you are not agree please reopen it.