--- sc/source/core/tool/interpr4.cxx	2005-04-14 09:50:06.000000000 +0530
+++ sc/source/core/tool/interpr4.cxx	2005-04-19 13:12:20.678272373 +0530
@@ -257,7 +257,7 @@ double ScInterpreter::GetCellValueOrZero
 			break;
 			case  CELLTYPE_STRING:
 			case  CELLTYPE_EDIT:
-#if 0
+#if 1 /* JEG : re-enable because compatibility is more important than consistency for this */
 // Xcl does it, but SUM(A1:A2) differs from A1+A2. No good.
 			{
 				String aStr;
@@ -268,7 +268,7 @@ double ScInterpreter::GetCellValueOrZero
 				sal_uInt32 nFIndex = 0;					// damit default Land/Spr.
 				if ( !pFormatter->IsNumberFormat( aStr, nFIndex, fValue ) )
 				{
-					SetError(errNoValue);
+					SetError(errCellNoValue);	/* CellNoValue is not really an error */
 					fValue = 0.0;
 				}
 			}
--- sc/source/core/tool/interpr1.cxx	2005-04-14 09:50:06.000000000 +0530
+++ sc/source/core/tool/interpr1.cxx	2005-04-19 12:08:07.486080311 +0530
@@ -2685,12 +2685,13 @@ double ScInterpreter::IterateParameters(
 	ScRange aRange;
 	for (short i = 0; i < nParamCount; i++)
 	{
-		switch (GetStackType())
+		StackVar eStackType = GetStackType();
+		switch (eStackType)
 		{
-
+			case svDouble:
 			case svString:
 			{
-				if( eFunc == ifCOUNT )
+				if( eFunc == ifCOUNT && eStackType == svString)
 				{
 					String aStr( PopString() );
 					ULONG nFIndex = 0;					// damit default Land/Spr.
@@ -2699,42 +2700,23 @@ double ScInterpreter::IterateParameters(
 				}
 				else
 				{
+					if ( bTextAsZero && eStackType == svString)
+					{
+						Pop();
+						nCount++;
+						if ( eFunc == ifPRODUCT )
+							fRes = 0.0;
+						fVal = 0;
+					}
+					else
+					{
+						fVal = GetDouble();
+						nCount++;
+					}
 					switch ( eFunc )
 					{
 						case ifAVERAGE:
 						case ifSUM:
-						case ifSUMSQ:
-						case ifPRODUCT:
-						{
-							if ( bTextAsZero )
-							{
-								Pop();
-								nCount++;
-								if ( eFunc == ifPRODUCT )
-									fRes = 0.0;
-							}
-							else
-							{
-								for ( ; i < nParamCount; i++ )
-									Pop();
-								SetError( errNoValue );
-							}
-						}
-						break;
-						default:
-							Pop();
-							nCount++;
-					}
-				}
-			}
-			break;
-			case svDouble    :
-				fVal = GetDouble();
-				nCount++;
-				switch( eFunc )
-				{
-					case ifAVERAGE:
-					case ifSUM:
 						if ( bNull && fVal != 0.0 )
 						{
 							bNull = FALSE;
@@ -2743,12 +2725,16 @@ double ScInterpreter::IterateParameters(
 						else
 							fRes += fVal;
 						break;
-					case ifSUMSQ:	fRes += fVal * fVal; break;
-					case ifPRODUCT:	fRes *= fVal; break;
-                    default: ; // nothing
+						case ifSUMSQ:	fRes += fVal * fVal; break;
+						case ifPRODUCT:	fRes *= fVal; break;
+
+						default:
+							break;
+					}
 				}
 				nFuncFmtType = NUMBERFORMAT_NUMBER;
-				break;
+			}
+			break;
 			case svSingleRef :
 			{
 				PopSingleRef( aAdr );
