]> source.dussan.org Git - poi.git/commitdiff
tidy up
authorPJ Fanning <fanningpj@apache.org>
Sat, 7 Aug 2021 23:56:22 +0000 (23:56 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 7 Aug 2021 23:56:22 +0000 (23:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892097 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/formula/atp/XLookupFunction.java

index 164af5681ee83295648eb30c11870bccf59609e2..a9bef0407bd2bbadb984ed74e433f08aa9a5f302 100644 (file)
@@ -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;