diff --git a/src/EPPlus/FormulaParsing/Excel/Functions/RefAndLookup/Indirect.cs b/src/EPPlus/FormulaParsing/Excel/Functions/RefAndLookup/Indirect.cs index 78b49f922..9a9655ae3 100644 --- a/src/EPPlus/FormulaParsing/Excel/Functions/RefAndLookup/Indirect.cs +++ b/src/EPPlus/FormulaParsing/Excel/Functions/RefAndLookup/Indirect.cs @@ -57,6 +57,13 @@ public override CompileResult Execute(IEnumerable arguments, P { return CompileResult.Empty; } + else if(!result.IsMulti) + { + var cell = result.FirstOrDefault(); + var val = cell != null ? cell.Value : null; + if (val == null) return CompileResult.Empty; + return new CompileResultFactory().Create(val); + } return new CompileResult(result, DataType.Enumerable); } }