diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-08-07 23:56:22 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-08-07 23:56:22 +0000 |
commit | c79ef7f76d7778c6fa49d976df72cde7f0747d87 (patch) | |
tree | 4c6a543717c9e1487744582cdbcf15dcc8ce5c2d | |
parent | 741e290267929ab03ff333b9f04912e61bae8b0d (diff) | |
download | poi-c79ef7f76d7778c6fa49d976df72cde7f0747d87.tar.gz poi-c79ef7f76d7778c6fa49d976df72cde7f0747d87.zip |
tidy up
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892097 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/formula/atp/XLookupFunction.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/atp/XLookupFunction.java b/poi/src/main/java/org/apache/poi/ss/formula/atp/XLookupFunction.java index 164af5681e..a9bef0407b 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/atp/XLookupFunction.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/atp/XLookupFunction.java @@ -58,7 +58,11 @@ final class XLookupFunction implements FreeRefFunction { if (matchedRow != -1) { if (valueEval instanceof AreaEval) { AreaEval area = (AreaEval)valueEval; - return area.getRelativeValue(matchedRow, 0); + if (area.getWidth() == 1) { + return area.getRelativeValue(matchedRow, 0); + } else { + return area.getRow(matchedRow); + } } } return ErrorEval.NUM_ERROR; |