You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LOOKUP function only returns a result if it can find an exact match in lookup vector, but does not support:
If the LOOKUP function can't find the lookup_value, the function matches the largest value in lookup_vector that is less than or equal to lookup_value.
If lookup_value is smaller than the smallest value in lookup_vector, LOOKUP returns the #N/A error value.
Important: The values in array must be placed in ascending order: ..., -2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP might not return the correct value. Uppercase and lowercase text are equivalent.
> go test
--- FAIL: TestCalcCellValue (7.88s)
calc_test.go:1218:
Error Trace: calc_test.go:1218
Error: Received unexpected error:
LOOKUP no result found
Test: TestCalcCellValue
Messages: =LOOKUP(F3+1,F3:F4,F3:F4)
calc_test.go:1219:
Error Trace: calc_test.go:1219
Error: Not equal:
expected: "22100"
actual : ""
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-22100
+
Test: TestCalcCellValue
Messages: =LOOKUP(F3+1,F3:F4,F3:F4)
Describe the results you expected:
I expected the test to pass.
Output of go version:
go version go1.16.7 linux/amd64
Excelize version or commit ID:
> git log
commit a55f354eb3d0c6c1b9a543ff8ff98227aa6063a6 (HEAD -> lookup, origin/master, origin/HEAD, master)
Author: xuri <xuri.me@gmail.com>
Date: Tue Aug 17 00:01:44 2021 +0800
This closes #989, closes #990
New API: `SetRowStyle` support for set style for the rows
Update documentation for the `GetRows`, `SetCellStyle` and `SetColStyle`
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Description
The LOOKUP function only returns a result if it can find an exact match in lookup vector, but does not support:
According to the official Microsoft Excel documentation: https://support.microsoft.com/en-us/office/lookup-function-446d94af-663b-451d-8251-369d5e3864cb
Steps to reproduce the issue:
go test
.Describe the results you received:
Describe the results you expected:
I expected the test to pass.
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
I'll try to make a pull request.
The text was updated successfully, but these errors were encountered: