diff options
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 0ac2e151f5cc..95dff9f1cc18 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -181,7 +181,9 @@ double ScInterpreter::GetCellValue( const ScAddress& rPos, ScRefCellValue& rCell FormulaError nErr = nGlobalError; nGlobalError = FormulaError::NONE; double nVal = GetCellValueOrZero(rPos, rCell); - if ( nGlobalError == FormulaError::NONE || nGlobalError == FormulaError::CellNoValue ) + // Propagate previous error, if any; nGlobalError==CellNoValue is not an + // error here, preserve previous error or non-error. + if (nErr != FormulaError::NONE || nGlobalError == FormulaError::CellNoValue) nGlobalError = nErr; return nVal; } |