Bug 83690 - Other: VLOOKUP not working right
Summary: Other: VLOOKUP not working right
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 22:04 UTC by nwaldyd@yahoo.co.uk
Modified: 2014-09-10 00:14 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample spreadsheet (1.58 MB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-09-09 22:04 UTC, nwaldyd@yahoo.co.uk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nwaldyd@yahoo.co.uk 2014-09-09 22:04:39 UTC
Created attachment 106013 [details]
Sample spreadsheet

Problem description: 

Steps to reproduce:
1. Open the spreadsheet attached
2. Calculate  VLOOKUP(TBTRAMITEDOCUMENTO.B2,$AUTOS_TRAMITADOS.$A$2:$A$23023,1) for all the TBTRAMITEDOCUMENTO.B values.
3. 

Current behavior:

Some values are not well calculated

Expected behavior:

All output values well calculates
              
Operating System: Fedora
Version: 4.1.6.2 release
Comment 1 m_a_riosv 2014-09-10 00:14:57 UTC
The problem is the searched range is not sorted, and the VLOOKUP() formula doesn't have the fourth option to 0 (unsorted).

Two options:

1) Sort the searched range.
2) Add the fourth parameter with 0 to VLOOKUP()
   =VLOOKUP($TBTRAMITEDOCUMENTO.B4;$AUTOS_TRAMITADOS.$A$2:$A$23023;1;0)

Please review the help about the function, the search must be exact with option 2)