After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 593238 - VLOOKUP/HLLOKUP/MATCH sometimes return wrong results
VLOOKUP/HLLOKUP/MATCH sometimes return wrong results
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other All
: Normal normal
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2009-08-26 22:47 UTC by Andreas J. Guelzow
Modified: 2009-08-27 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample file (19.50 KB, application/vnd.ms-excel)
2009-08-26 22:47 UTC, Andreas J. Guelzow
Details

Description Andreas J. Guelzow 2009-08-26 22:47:21 UTC
Created attachment 141803 [details]
sample file

I will be attaching a file from
https://bugs.launchpad.net/ubuntu/+source/gnumeric/+bug/418366 

That bug report is slightly confused, but the main problem i see is that in the
file the calculation of F6:F8 on the "Buggy lookup" sheet appears incorrect.
Comment 1 Morten Welinder 2009-08-26 23:04:51 UTC
Unrelatedly, the code or this help text is wrong.  The default is TRUE.

        { GNM_FUNC_HELP_ARG, F_("approximate:if false, an exact match of @{value} "
				"must be found; defaults to FALSE")},
Comment 2 Morten Welinder 2009-08-26 23:18:07 UTC
I see the problem: the caches for hlookup and vlookup need to be separate.
Comment 3 Andreas J. Guelzow 2009-08-27 00:03:05 UTC
Regarding comment 1 bor both Excel and ODF, the default is TRUE, so the documentation is incorrect.
Comment 4 Morten Welinder 2009-08-27 00:25:34 UTC
Fixed.

C7:D8 still have errors, but I think that is because the formulas are
wrong.  (It looks like they should use the as-index mode of h/vlookup.)
Comment 5 Morten Welinder 2009-08-27 00:27:28 UTC
Note, that the values calculated (before the fix) depended on evaluation
order.  Lots of strangeness can be explained that way.
Comment 6 Andreas J. Guelzow 2009-08-27 02:46:53 UTC
re comment4: Excel doesn't have the as-index mode it seems, so since he uses xls file format he may depend on compatibility with XL.
Comment 7 Morten Welinder 2009-08-27 15:45:06 UTC
re comment 5: my point was that the formulas aren't right and that C7:D8
are in error because of that.  I believe Gnumeric does the right thing.

To get the index, MATCH can probably be used.