Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix LOOKUP function for Array form #995

Closed
wants to merge 1 commit into from

Conversation

stanim
Copy link
Contributor

@stanim stanim commented Aug 18, 2021

PR Details

Support Array form use of function LOOKUP

Description

Excelize already supports the Vector form of LOOKUP. This pull request fixes Array form use of function LOOKUP. As a result these two expressions are equivalent and return the same result:

LOOKUP(E3,E2:E5,F2:F5)
LOOKUP(E3,E2:F5)

Related Issue

Fixes #994

Motivation and Context

This helps with Excels from third party, where one has no control which form of LOOKUP is used.

How Has This Been Tested

Added tests to calc_test.go

Tested on:

  • OS: Archlinux 5.13.10-arch1-1
  • WPS Spreadsheets (version wps-office 11.1.0.10702-1)
  • LibreCalc (version libreoffice-fresh 7.1.5-2)

Types of changes

  • Docs change / refactoring / dependency upgrade
  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [ x] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • [x ] I have added tests to cover my changes.
  • [ x] All new and existing tests passed.

@stanim stanim closed this Aug 18, 2021
@stanim stanim deleted the lookup-array-form branch August 19, 2021 16:09
@xuri xuri added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LOOKUP does not handle Array form correctly
2 participants