From 2d2e3fc4f7472c0aa19820cc9fa1dee0d7d32df2 Mon Sep 17 00:00:00 2001
From: "Alexander.Trofimov" <Alexander.Trofimov@onlyoffice.com>
Date: Tue, 14 Mar 2017 12:56:19 +0300
Subject: [PATCH] argumentsMin, argumentsMax move to prototype

---
 cell/model/FormulaObjects/cubeFunctions.js    |  15 --
 .../FormulaObjects/dateandtimeFunctions.js    |  83 +++----
 .../FormulaObjects/engineeringFunctions.js    | 138 ++++++++---
 .../FormulaObjects/financialFunctions.js      | 212 ++++++++--------
 .../FormulaObjects/informationFunctions.js    |  60 +++--
 cell/model/FormulaObjects/logicalFunctions.js |  25 +-
 .../lookupandreferenceFunctions.js            |  54 ++---
 .../FormulaObjects/mathematicFunctions.js     | 229 +++++++++---------
 cell/model/FormulaObjects/parserFormula.js    |   6 +-
 .../FormulaObjects/statisticalFunctions.js    | 226 ++++++++---------
 .../FormulaObjects/textanddataFunctions.js    |  91 ++++---
 11 files changed, 570 insertions(+), 569 deletions(-)

diff --git a/cell/model/FormulaObjects/cubeFunctions.js b/cell/model/FormulaObjects/cubeFunctions.js
index fb186ed44..5ce652979 100644
--- a/cell/model/FormulaObjects/cubeFunctions.js
+++ b/cell/model/FormulaObjects/cubeFunctions.js
@@ -37,7 +37,6 @@
  * @param {undefined} undefined
  */
 	function (window, undefined) {
-	var cElementType = AscCommonExcel.cElementType;
 	var cBaseFunction = AscCommonExcel.cBaseFunction;
 	var cFormulaFunctionGroup = AscCommonExcel.cFormulaFunctionGroup;
 
@@ -52,9 +51,7 @@
 	function cCUBEKPIMEMBER() {
 		this.name = "CUBEKPIMEMBER";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBEKPIMEMBER.prototype = Object.create(cBaseFunction.prototype);
@@ -67,9 +64,7 @@
 	function cCUBEMEMBER() {
 		this.name = "CUBEMEMBER";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBEMEMBER.prototype = Object.create(cBaseFunction.prototype);
@@ -82,9 +77,7 @@
 	function cCUBEMEMBERPROPERTY() {
 		this.name = "CUBEMEMBERPROPERTY";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBEMEMBERPROPERTY.prototype = Object.create(cBaseFunction.prototype);
@@ -97,9 +90,7 @@
 	function cCUBERANKEDMEMBER() {
 		this.name = "CUBERANKEDMEMBER";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBERANKEDMEMBER.prototype = Object.create(cBaseFunction.prototype);
@@ -112,9 +103,7 @@
 	function cCUBESET() {
 		this.name = "CUBESET";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBESET.prototype = Object.create(cBaseFunction.prototype);
@@ -127,9 +116,7 @@
 	function cCUBESETCOUNT() {
 		this.name = "CUBESETCOUNT";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBESETCOUNT.prototype = Object.create(cBaseFunction.prototype);
@@ -142,9 +129,7 @@
 	function cCUBEVALUE() {
 		this.name = "CUBEVALUE";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCUBEVALUE.prototype = Object.create(cBaseFunction.prototype);
diff --git a/cell/model/FormulaObjects/dateandtimeFunctions.js b/cell/model/FormulaObjects/dateandtimeFunctions.js
index 56d6f8057..868ddb0fe 100644
--- a/cell/model/FormulaObjects/dateandtimeFunctions.js
+++ b/cell/model/FormulaObjects/dateandtimeFunctions.js
@@ -38,7 +38,6 @@
 	function (window, undefined) {
 	var g_oFormatParser = AscCommon.g_oFormatParser;
 
-	var cElementType = AscCommonExcel.cElementType;
 	var cErrorType = AscCommonExcel.cErrorType;
 	var c_sPerDay = AscCommonExcel.c_sPerDay;
 	var c_msPerDay = AscCommonExcel.c_msPerDay;
@@ -301,13 +300,13 @@
 	function cDATE() {
 		this.name = "DATE";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cDATE.prototype = Object.create(cBaseFunction.prototype);
 	cDATE.prototype.constructor = cDATE;
+	cDATE.prototype.argumentsMin = 3;
+	cDATE.prototype.argumentsMax = 3;
 	cDATE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], year, month, day;
 
@@ -374,13 +373,13 @@
 	function cDATEDIF() {
 		this.name = "DATEDIF";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cDATEDIF.prototype = Object.create(cBaseFunction.prototype);
 	cDATEDIF.prototype.constructor = cDATEDIF;
+	cDATEDIF.prototype.argumentsMin = 3;
+	cDATEDIF.prototype.argumentsMax = 3;
 	cDATEDIF.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDATEDIF.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -495,13 +494,13 @@
 	function cDATEVALUE() {
 		this.name = "DATEVALUE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cDATEVALUE.prototype = Object.create(cBaseFunction.prototype);
 	cDATEVALUE.prototype.constructor = cDATEVALUE;
+	cDATEVALUE.prototype.argumentsMin = 1;
+	cDATEVALUE.prototype.argumentsMax = 1;
 	cDATEVALUE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDATEVALUE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
@@ -538,13 +537,13 @@
 	function cDAY() {
 		this.name = "DAY";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cDAY.prototype = Object.create(cBaseFunction.prototype);
 	cDAY.prototype.constructor = cDAY;
+	cDAY.prototype.argumentsMin = 1;
+	cDAY.prototype.argumentsMax = 1;
 	cDAY.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDAY.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], val;
@@ -614,13 +613,13 @@
 	function cDAYS360() {
 		this.name = "DAYS360";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cDAYS360.prototype = Object.create(cBaseFunction.prototype);
 	cDAYS360.prototype.constructor = cDAYS360;
+	cDAYS360.prototype.argumentsMin = 2;
+	cDAYS360.prototype.argumentsMax = 3;
 	cDAYS360.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDAYS360.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cBool(false);
@@ -683,13 +682,13 @@
 	function cEDATE() {
 		this.name = "EDATE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cEDATE.prototype = Object.create(cBaseFunction.prototype);
 	cEDATE.prototype.constructor = cEDATE;
+	cEDATE.prototype.argumentsMin = 2;
+	cEDATE.prototype.argumentsMax = 2;
 	cEDATE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cEDATE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
@@ -761,13 +760,13 @@
 	function cEOMONTH() {
 		this.name = "EOMONTH";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cEOMONTH.prototype = Object.create(cBaseFunction.prototype);
 	cEOMONTH.prototype.constructor = cEOMONTH;
+	cEOMONTH.prototype.argumentsMin = 2;
+	cEOMONTH.prototype.argumentsMax = 2;
 	cEOMONTH.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cEOMONTH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
@@ -830,13 +829,13 @@
 	function cHOUR() {
 		this.name = "HOUR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cHOUR.prototype = Object.create(cBaseFunction.prototype);
 	cHOUR.prototype.constructor = cHOUR;
+	cHOUR.prototype.argumentsMin = 1;
+	cHOUR.prototype.argumentsMax = 1;
 	cHOUR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cHOUR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], val;
@@ -898,13 +897,13 @@
 	function cMINUTE() {
 		this.name = "MINUTE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cMINUTE.prototype = Object.create(cBaseFunction.prototype);
 	cMINUTE.prototype.constructor = cMINUTE;
+	cMINUTE.prototype.argumentsMin = 1;
+	cMINUTE.prototype.argumentsMax = 1;
 	cMINUTE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMINUTE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], val;
@@ -965,13 +964,13 @@
 	function cMONTH() {
 		this.name = "MONTH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cMONTH.prototype = Object.create(cBaseFunction.prototype);
 	cMONTH.prototype.constructor = cMONTH;
+	cMONTH.prototype.argumentsMin = 1;
+	cMONTH.prototype.argumentsMax = 1;
 	cMONTH.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMONTH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], val;
@@ -1037,13 +1036,13 @@
 	function cNETWORKDAYS() {
 		this.name = "NETWORKDAYS";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cNETWORKDAYS.prototype = Object.create(cBaseFunction.prototype);
 	cNETWORKDAYS.prototype.constructor = cNETWORKDAYS;
+	cNETWORKDAYS.prototype.argumentsMin = 2;
+	cNETWORKDAYS.prototype.argumentsMax = 3;
 	cNETWORKDAYS.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cNETWORKDAYS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -1177,13 +1176,12 @@
 	function cNOW() {
 		this.name = "NOW";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cNOW.prototype = Object.create(cBaseFunction.prototype);
 	cNOW.prototype.constructor = cNOW;
+	cNOW.prototype.argumentsMax = 0;
 	cNOW.prototype.Calculate = function () {
 		var d = new Date();
 		this.value = new cNumber(d.getExcelDate() +
@@ -1204,13 +1202,13 @@
 	function cSECOND() {
 		this.name = "SECOND";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cSECOND.prototype = Object.create(cBaseFunction.prototype);
 	cSECOND.prototype.constructor = cSECOND;
+	cSECOND.prototype.argumentsMin = 1;
+	cSECOND.prototype.argumentsMax = 1;
 	cSECOND.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cSECOND.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], val;
@@ -1271,13 +1269,13 @@
 	function cTIME() {
 		this.name = "TIME";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cTIME.prototype = Object.create(cBaseFunction.prototype);
 	cTIME.prototype.constructor = cTIME;
+	cTIME.prototype.argumentsMin = 3;
+	cTIME.prototype.argumentsMax = 3;
 	cTIME.prototype.Calculate = function (arg) {
 		var hour = arg[0], minute = arg[1], second = arg[2];
 
@@ -1335,13 +1333,13 @@
 	function cTIMEVALUE() {
 		this.name = "TIMEVALUE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cTIMEVALUE.prototype = Object.create(cBaseFunction.prototype);
 	cTIMEVALUE.prototype.constructor = cTIMEVALUE;
+	cTIMEVALUE.prototype.argumentsMin = 1;
+	cTIMEVALUE.prototype.argumentsMax = 1;
 	cTIMEVALUE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cTIMEVALUE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
@@ -1379,13 +1377,12 @@
 	function cTODAY() {
 		this.name = "TODAY";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cTODAY.prototype = Object.create(cBaseFunction.prototype);
 	cTODAY.prototype.constructor = cTODAY;
+	cTODAY.prototype.argumentsMax = 0;
 	cTODAY.prototype.Calculate = function () {
 		this.setCA(new cNumber(new Date().getExcelDate()), true);
 		if (arguments[1].getNumFormatStr().toLowerCase() === "general") {
@@ -1406,13 +1403,13 @@
 	function cWEEKDAY() {
 		this.name = "WEEKDAY";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cWEEKDAY.prototype = Object.create(cBaseFunction.prototype);
 	cWEEKDAY.prototype.constructor = cWEEKDAY;
+	cWEEKDAY.prototype.argumentsMin = 1;
+	cWEEKDAY.prototype.argumentsMax = 2;
 	cWEEKDAY.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cWEEKDAY.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cNumber(1);
@@ -1492,13 +1489,13 @@
 	function cWEEKNUM() {
 		this.name = "WEEKNUM";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cWEEKNUM.prototype = Object.create(cBaseFunction.prototype);
 	cWEEKNUM.prototype.constructor = cWEEKNUM;
+	cWEEKNUM.prototype.argumentsMin = 1;
+	cWEEKNUM.prototype.argumentsMax = 2;
 	cWEEKNUM.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cWEEKNUM.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cNumber(1), type = 0;
@@ -1611,13 +1608,13 @@
 	function cWORKDAY() {
 		this.name = "WORKDAY";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cWORKDAY.prototype = Object.create(cBaseFunction.prototype);
 	cWORKDAY.prototype.constructor = cWORKDAY;
+	cWORKDAY.prototype.argumentsMin = 2;
+	cWORKDAY.prototype.argumentsMax = 3;
 	cWORKDAY.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cWORKDAY.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -1752,13 +1749,13 @@
 	function cYEAR() {
 		this.name = "YEAR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cYEAR.prototype = Object.create(cBaseFunction.prototype);
 	cYEAR.prototype.constructor = cYEAR;
+	cYEAR.prototype.argumentsMin = 1;
+	cYEAR.prototype.argumentsMax = 1;
 	cYEAR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cYEAR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], val;
@@ -1818,13 +1815,13 @@
 	function cYEARFRAC() {
 		this.name = "YEARFRAC";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cYEARFRAC.prototype = Object.create(cBaseFunction.prototype);
 	cYEARFRAC.prototype.constructor = cYEARFRAC;
+	cYEARFRAC.prototype.argumentsMin = 2;
+	cYEARFRAC.prototype.argumentsMax = 3;
 	cYEARFRAC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cYEARFRAC.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cNumber(0);
diff --git a/cell/model/FormulaObjects/engineeringFunctions.js b/cell/model/FormulaObjects/engineeringFunctions.js
index 3198af1ec..fd6016caa 100644
--- a/cell/model/FormulaObjects/engineeringFunctions.js
+++ b/cell/model/FormulaObjects/engineeringFunctions.js
@@ -881,11 +881,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cBESSELI() {
-		cBaseFunction.call(this, "BESSELI", 2, 2);
+		cBaseFunction.call(this, "BESSELI");
 	}
 
 	cBESSELI.prototype = Object.create(cBaseFunction.prototype);
 	cBESSELI.prototype.constructor = cBESSELI;
+	cBESSELI.prototype.argumentsMin = 2;
+	cBESSELI.prototype.argumentsMax = 2;
 	/*cBESSELI.prototype.Calculate = function ( arg ) {
 	 var x = arg[0],
 	 n = arg[1];
@@ -969,11 +971,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cBIN2DEC() {
-		cBaseFunction.call(this, "BIN2DEC", 1, 1);
+		cBaseFunction.call(this, "BIN2DEC");
 	}
 
 	cBIN2DEC.prototype = Object.create(cBaseFunction.prototype);
 	cBIN2DEC.prototype.constructor = cBIN2DEC;
+	cBIN2DEC.prototype.argumentsMin = 1;
+	cBIN2DEC.prototype.argumentsMax = 1;
 	cBIN2DEC.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -1020,11 +1024,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cBIN2HEX() {
-		cBaseFunction.call(this, "BIN2HEX", 1, 2);
+		cBaseFunction.call(this, "BIN2HEX");
 	}
 
 	cBIN2HEX.prototype = Object.create(cBaseFunction.prototype);
 	cBIN2HEX.prototype.constructor = cBIN2HEX;
+	cBIN2HEX.prototype.argumentsMin = 1;
+	cBIN2HEX.prototype.argumentsMax = 2;
 	cBIN2HEX.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
@@ -1087,11 +1093,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cBIN2OCT() {
-		cBaseFunction.call(this, "BIN2OCT", 1, 2);
+		cBaseFunction.call(this, "BIN2OCT");
 	}
 
 	cBIN2OCT.prototype = Object.create(cBaseFunction.prototype);
 	cBIN2OCT.prototype.constructor = cBIN2OCT;
+	cBIN2OCT.prototype.argumentsMin = 1;
+	cBIN2OCT.prototype.argumentsMax = 2;
 	cBIN2OCT.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
@@ -1154,11 +1162,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cCOMPLEX() {
-		cBaseFunction.call(this, "COMPLEX", 2, 3);
+		cBaseFunction.call(this, "COMPLEX");
 	}
 
 	cCOMPLEX.prototype = Object.create(cBaseFunction.prototype);
 	cCOMPLEX.prototype.constructor = cCOMPLEX;
+	cCOMPLEX.prototype.argumentsMin = 2;
+	cCOMPLEX.prototype.argumentsMax = 3;
 	cCOMPLEX.prototype.Calculate = function (arg) {
 
 		var real = arg[0], img = arg[1], suf = !arg[2] || arg[2] instanceof AscCommonExcel.cEmpty ? new cString("i") :
@@ -1232,11 +1242,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cDEC2BIN() {
-		cBaseFunction.call(this, "DEC2BIN", 1, 2);
+		cBaseFunction.call(this, "DEC2BIN");
 	}
 
 	cDEC2BIN.prototype = Object.create(cBaseFunction.prototype);
 	cDEC2BIN.prototype.constructor = cDEC2BIN;
+	cDEC2BIN.prototype.argumentsMin = 1;
+	cDEC2BIN.prototype.argumentsMax = 2;
 	cDEC2BIN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
 
@@ -1294,11 +1306,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cDEC2HEX() {
-		cBaseFunction.call(this, "DEC2HEX", 1, 2);
+		cBaseFunction.call(this, "DEC2HEX");
 	}
 
 	cDEC2HEX.prototype = Object.create(cBaseFunction.prototype);
 	cDEC2HEX.prototype.constructor = cDEC2HEX;
+	cDEC2HEX.prototype.argumentsMin = 1;
+	cDEC2HEX.prototype.argumentsMax = 2;
 	cDEC2HEX.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
 
@@ -1355,11 +1369,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cDEC2OCT() {
-		cBaseFunction.call(this, "DEC2OCT", 1, 2);
+		cBaseFunction.call(this, "DEC2OCT");
 	}
 
 	cDEC2OCT.prototype = Object.create(cBaseFunction.prototype);
 	cDEC2OCT.prototype.constructor = cDEC2OCT;
+	cDEC2OCT.prototype.argumentsMin = 1;
+	cDEC2OCT.prototype.argumentsMax = 2;
 	cDEC2OCT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
 
@@ -1416,11 +1432,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cDELTA() {
-		cBaseFunction.call(this, "DELTA", 1, 2);
+		cBaseFunction.call(this, "DELTA");
 	}
 
 	cDELTA.prototype = Object.create(cBaseFunction.prototype);
 	cDELTA.prototype.constructor = cDELTA;
+	cDELTA.prototype.argumentsMin = 1;
+	cDELTA.prototype.argumentsMax = 2;
 	cDELTA.prototype.Calculate = function (arg) {
 
 		var number1 = arg[0], number2 = !arg[1] ? new cNumber(0) : arg[1];
@@ -1466,11 +1484,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cERF() {
-		cBaseFunction.call(this, "ERF", 1, 2);
+		cBaseFunction.call(this, "ERF");
 	}
 
 	cERF.prototype = Object.create(cBaseFunction.prototype);
 	cERF.prototype.constructor = cERF;
+	cERF.prototype.argumentsMin = 1;
+	cERF.prototype.argumentsMax = 2;
 	cERF.prototype.Calculate = function (arg) {
 
 		var a = arg[0], b = arg[1] ? arg[1] : new cUndefined();
@@ -1521,11 +1541,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cERFC() {
-		cBaseFunction.call(this, "ERFC", 1, 1);
+		cBaseFunction.call(this, "ERFC");
 	}
 
 	cERFC.prototype = Object.create(cBaseFunction.prototype);
 	cERFC.prototype.constructor = cERFC;
+	cERFC.prototype.argumentsMin = 1;
+	cERFC.prototype.argumentsMax = 1;
 	cERFC.prototype.Calculate = function (arg) {
 
 		var a = arg[0];
@@ -1558,11 +1580,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cGESTEP() {
-		cBaseFunction.call(this, "GESTEP", 1, 2);
+		cBaseFunction.call(this, "GESTEP");
 	}
 
 	cGESTEP.prototype = Object.create(cBaseFunction.prototype);
 	cGESTEP.prototype.constructor = cGESTEP;
+	cGESTEP.prototype.argumentsMin = 1;
+	cGESTEP.prototype.argumentsMax = 2;
 	cGESTEP.prototype.Calculate = function (arg) {
 
 		var number1 = arg[0], number2 = !arg[1] ? new cNumber(0) : arg[1];
@@ -1608,11 +1632,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cHEX2BIN() {
-		cBaseFunction.call(this, "HEX2BIN", 1, 2);
+		cBaseFunction.call(this, "HEX2BIN");
 	}
 
 	cHEX2BIN.prototype = Object.create(cBaseFunction.prototype);
 	cHEX2BIN.prototype.constructor = cHEX2BIN;
+	cHEX2BIN.prototype.argumentsMin = 1;
+	cHEX2BIN.prototype.argumentsMax = 2;
 	cHEX2BIN.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
@@ -1682,11 +1708,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cHEX2DEC() {
-		cBaseFunction.call(this, "HEX2DEC", 1, 1);
+		cBaseFunction.call(this, "HEX2DEC");
 	}
 
 	cHEX2DEC.prototype = Object.create(cBaseFunction.prototype);
 	cHEX2DEC.prototype.constructor = cHEX2DEC;
+	cHEX2DEC.prototype.argumentsMin = 1;
+	cHEX2DEC.prototype.argumentsMax = 1;
 	cHEX2DEC.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -1732,11 +1760,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cHEX2OCT() {
-		cBaseFunction.call(this, "HEX2OCT", 1, 2);
+		cBaseFunction.call(this, "HEX2OCT");
 	}
 
 	cHEX2OCT.prototype = Object.create(cBaseFunction.prototype);
 	cHEX2OCT.prototype.constructor = cHEX2OCT;
+	cHEX2OCT.prototype.argumentsMin = 1;
+	cHEX2OCT.prototype.argumentsMax = 2;
 	cHEX2OCT.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
@@ -1805,11 +1835,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMABS() {
-		cBaseFunction.call(this, "IMABS", 1, 1);
+		cBaseFunction.call(this, "IMABS");
 	}
 
 	cIMABS.prototype = Object.create(cBaseFunction.prototype);
 	cIMABS.prototype.constructor = cIMABS;
+	cIMABS.prototype.argumentsMin = 1;
+	cIMABS.prototype.argumentsMax = 1;
 	cIMABS.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -1848,11 +1880,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMAGINARY() {
-		cBaseFunction.call(this, "IMAGINARY", 1, 1);
+		cBaseFunction.call(this, "IMAGINARY");
 	}
 
 	cIMAGINARY.prototype = Object.create(cBaseFunction.prototype);
 	cIMAGINARY.prototype.constructor = cIMAGINARY;
+	cIMAGINARY.prototype.argumentsMin = 1;
+	cIMAGINARY.prototype.argumentsMax = 1;
 	cIMAGINARY.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -1891,11 +1925,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMARGUMENT() {
-		cBaseFunction.call(this, "IMARGUMENT", 1, 1);
+		cBaseFunction.call(this, "IMARGUMENT");
 	}
 
 	cIMARGUMENT.prototype = Object.create(cBaseFunction.prototype);
 	cIMARGUMENT.prototype.constructor = cIMARGUMENT;
+	cIMARGUMENT.prototype.argumentsMin = 1;
+	cIMARGUMENT.prototype.argumentsMax = 1;
 	cIMARGUMENT.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -1934,11 +1970,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMCONJUGATE() {
-		cBaseFunction.call(this, "IMCONJUGATE", 1, 1);
+		cBaseFunction.call(this, "IMCONJUGATE");
 	}
 
 	cIMCONJUGATE.prototype = Object.create(cBaseFunction.prototype);
 	cIMCONJUGATE.prototype.constructor = cIMCONJUGATE;
+	cIMCONJUGATE.prototype.argumentsMin = 1;
+	cIMCONJUGATE.prototype.argumentsMax = 1;
 	cIMCONJUGATE.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -1977,11 +2015,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMCOS() {
-		cBaseFunction.call(this, "IMCOS", 1, 1);
+		cBaseFunction.call(this, "IMCOS");
 	}
 
 	cIMCOS.prototype = Object.create(cBaseFunction.prototype);
 	cIMCOS.prototype.constructor = cIMCOS;
+	cIMCOS.prototype.argumentsMin = 1;
+	cIMCOS.prototype.argumentsMax = 1;
 	cIMCOS.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2022,11 +2062,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMDIV() {
-		cBaseFunction.call(this, "IMDIV", 2, 2);
+		cBaseFunction.call(this, "IMDIV");
 	}
 
 	cIMDIV.prototype = Object.create(cBaseFunction.prototype);
 	cIMDIV.prototype.constructor = cIMDIV;
+	cIMDIV.prototype.argumentsMin = 2;
+	cIMDIV.prototype.argumentsMax = 2;
 	cIMDIV.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1];
@@ -2078,11 +2120,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMEXP() {
-		cBaseFunction.call(this, "IMEXP", 1, 1);
+		cBaseFunction.call(this, "IMEXP");
 	}
 
 	cIMEXP.prototype = Object.create(cBaseFunction.prototype);
 	cIMEXP.prototype.constructor = cIMEXP;
+	cIMEXP.prototype.argumentsMin = 1;
+	cIMEXP.prototype.argumentsMax = 1;
 	cIMEXP.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2123,11 +2167,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMLN() {
-		cBaseFunction.call(this, "IMLN", 1, 1);
+		cBaseFunction.call(this, "IMLN");
 	}
 
 	cIMLN.prototype = Object.create(cBaseFunction.prototype);
 	cIMLN.prototype.constructor = cIMLN;
+	cIMLN.prototype.argumentsMin = 1;
+	cIMLN.prototype.argumentsMax = 1;
 	cIMLN.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2172,11 +2218,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMLOG10() {
-		cBaseFunction.call(this, "IMLOG10", 1, 1);
+		cBaseFunction.call(this, "IMLOG10");
 	}
 
 	cIMLOG10.prototype = Object.create(cBaseFunction.prototype);
 	cIMLOG10.prototype.constructor = cIMLOG10;
+	cIMLOG10.prototype.argumentsMin = 1;
+	cIMLOG10.prototype.argumentsMax = 1;
 	cIMLOG10.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2221,11 +2269,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMLOG2() {
-		cBaseFunction.call(this, "IMLOG2", 1, 1);
+		cBaseFunction.call(this, "IMLOG2");
 	}
 
 	cIMLOG2.prototype = Object.create(cBaseFunction.prototype);
 	cIMLOG2.prototype.constructor = cIMLOG2;
+	cIMLOG2.prototype.argumentsMin = 1;
+	cIMLOG2.prototype.argumentsMax = 1;
 	cIMLOG2.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2270,11 +2320,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMPOWER() {
-		cBaseFunction.call(this, "IMPOWER", 2, 2);
+		cBaseFunction.call(this, "IMPOWER");
 	}
 
 	cIMPOWER.prototype = Object.create(cBaseFunction.prototype);
 	cIMPOWER.prototype.constructor = cIMPOWER;
+	cIMPOWER.prototype.argumentsMin = 2;
+	cIMPOWER.prototype.argumentsMax = 2;
 	cIMPOWER.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1];
@@ -2329,11 +2381,12 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMPRODUCT() {
-		cBaseFunction.call(this, "IMPRODUCT", 1);
+		cBaseFunction.call(this, "IMPRODUCT");
 	}
 
 	cIMPRODUCT.prototype = Object.create(cBaseFunction.prototype);
 	cIMPRODUCT.prototype.constructor = cIMPRODUCT;
+	cIMPRODUCT.prototype.argumentsMin = 1;
 	cIMPRODUCT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], t = this;
 
@@ -2430,11 +2483,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMREAL() {
-		cBaseFunction.call(this, "IMREAL", 1, 1);
+		cBaseFunction.call(this, "IMREAL");
 	}
 
 	cIMREAL.prototype = Object.create(cBaseFunction.prototype);
 	cIMREAL.prototype.constructor = cIMREAL;
+	cIMREAL.prototype.argumentsMin = 1;
+	cIMREAL.prototype.argumentsMax = 1;
 	cIMREAL.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2473,11 +2528,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMSIN() {
-		cBaseFunction.call(this, "IMSIN", 1, 1);
+		cBaseFunction.call(this, "IMSIN");
 	}
 
 	cIMSIN.prototype = Object.create(cBaseFunction.prototype);
 	cIMSIN.prototype.constructor = cIMSIN;
+	cIMSIN.prototype.argumentsMin = 1;
+	cIMSIN.prototype.argumentsMax = 1;
 	cIMSIN.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2518,11 +2575,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMSQRT() {
-		cBaseFunction.call(this, "IMSQRT", 1, 1);
+		cBaseFunction.call(this, "IMSQRT");
 	}
 
 	cIMSQRT.prototype = Object.create(cBaseFunction.prototype);
 	cIMSQRT.prototype.constructor = cIMSQRT;
+	cIMSQRT.prototype.argumentsMin = 1;
+	cIMSQRT.prototype.argumentsMax = 1;
 	cIMSQRT.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2563,11 +2622,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMSUB() {
-		cBaseFunction.call(this, "IMSUB", 2, 2);
+		cBaseFunction.call(this, "IMSUB");
 	}
 
 	cIMSUB.prototype = Object.create(cBaseFunction.prototype);
 	cIMSUB.prototype.constructor = cIMSUB;
+	cIMSUB.prototype.argumentsMin = 2;
+	cIMSUB.prototype.argumentsMax = 2;
 	cIMSUB.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1];
@@ -2619,11 +2680,12 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cIMSUM() {
-		cBaseFunction.call(this, "IMSUM", 1);
+		cBaseFunction.call(this, "IMSUM");
 	}
 
 	cIMSUM.prototype = Object.create(cBaseFunction.prototype);
 	cIMSUM.prototype.constructor = cIMSUM;
+	cIMSUM.prototype.argumentsMin = 1;
 	cIMSUM.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], t = this;
@@ -2721,11 +2783,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cOCT2BIN() {
-		cBaseFunction.call(this, "OCT2BIN", 1, 2);
+		cBaseFunction.call(this, "OCT2BIN");
 	}
 
 	cOCT2BIN.prototype = Object.create(cBaseFunction.prototype);
 	cOCT2BIN.prototype.constructor = cOCT2BIN;
+	cOCT2BIN.prototype.argumentsMin = 1;
+	cOCT2BIN.prototype.argumentsMax = 2;
 	cOCT2BIN.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
@@ -2795,11 +2859,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cOCT2DEC() {
-		cBaseFunction.call(this, "OCT2DEC", 1, 1);
+		cBaseFunction.call(this, "OCT2DEC");
 	}
 
 	cOCT2DEC.prototype = Object.create(cBaseFunction.prototype);
 	cOCT2DEC.prototype.constructor = cOCT2DEC;
+	cOCT2DEC.prototype.argumentsMin = 1;
+	cOCT2DEC.prototype.argumentsMax = 1;
 	cOCT2DEC.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0];
@@ -2845,11 +2911,13 @@
 	 * @extends {AscCommonExcel.cBaseFunction}
 	 */
 	function cOCT2HEX() {
-		cBaseFunction.call(this, "OCT2HEX", 1, 2);
+		cBaseFunction.call(this, "OCT2HEX");
 	}
 
 	cOCT2HEX.prototype = Object.create(cBaseFunction.prototype);
 	cOCT2HEX.prototype.constructor = cOCT2HEX;
+	cOCT2HEX.prototype.argumentsMin = 1;
+	cOCT2HEX.prototype.argumentsMax = 2;
 	cOCT2HEX.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cUndefined();
diff --git a/cell/model/FormulaObjects/financialFunctions.js b/cell/model/FormulaObjects/financialFunctions.js
index 2f0fac6b8..c023764f8 100644
--- a/cell/model/FormulaObjects/financialFunctions.js
+++ b/cell/model/FormulaObjects/financialFunctions.js
@@ -37,7 +37,6 @@
  * @param {undefined} undefined
  */
 	function (window, undefined) {
-	var cElementType = AscCommonExcel.cElementType;
 	var cErrorType = AscCommonExcel.cErrorType;
 	var cNumber = AscCommonExcel.cNumber;
 	var cBool = AscCommonExcel.cBool;
@@ -469,13 +468,13 @@
 	function cACCRINT() {
 		this.name = "ACCRINT";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 8;
 	}
 
 	cACCRINT.prototype = Object.create(cBaseFunction.prototype);
 	cACCRINT.prototype.constructor = cACCRINT;
+	cACCRINT.prototype.argumentsMin = 6;
+	cACCRINT.prototype.argumentsMax = 8;
 	cACCRINT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cACCRINT.prototype.Calculate = function (arg) {
 		var issue = arg[0], firstInterest = arg[1], settlement = arg[2], rate = arg[3], par = arg[4] &&
@@ -645,13 +644,13 @@
 	function cACCRINTM() {
 		this.name = "ACCRINTM";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cACCRINTM.prototype = Object.create(cBaseFunction.prototype);
 	cACCRINTM.prototype.constructor = cACCRINTM;
+	cACCRINTM.prototype.argumentsMin = 3;
+	cACCRINTM.prototype.argumentsMax = 5;
 	cACCRINTM.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cACCRINTM.prototype.Calculate = function (arg) {
 		var issue = arg[0], settlement = arg[1], rate = arg[2], par = arg[3] && !(arg[3] instanceof cEmpty) ? arg[3] :
@@ -740,13 +739,13 @@
 	function cAMORDEGRC() {
 		this.name = "AMORDEGRC";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 7;
 	}
 
 	cAMORDEGRC.prototype = Object.create(cBaseFunction.prototype);
 	cAMORDEGRC.prototype.constructor = cAMORDEGRC;
+	cAMORDEGRC.prototype.argumentsMin = 6;
+	cAMORDEGRC.prototype.argumentsMax = 7;
 	cAMORDEGRC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cAMORDEGRC.prototype.Calculate = function (arg) {
 		var cost = arg[0], datePurch = arg[1], firstPer = arg[2], salvage = arg[3], period = arg[4], rate = arg[5], basis = arg[6] &&
@@ -938,13 +937,13 @@
 	function cAMORLINC() {
 		this.name = "AMORLINC";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 7;
 	}
 
 	cAMORLINC.prototype = Object.create(cBaseFunction.prototype);
 	cAMORLINC.prototype.constructor = cAMORLINC;
+	cAMORLINC.prototype.argumentsMin = 6;
+	cAMORLINC.prototype.argumentsMax = 7;
 	cAMORLINC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cAMORLINC.prototype.Calculate = function (arg) {
 		var cost = arg[0], datePurch = arg[1], firstPer = arg[2], salvage = arg[3], period = arg[4], rate = arg[5], basis = arg[6] &&
@@ -1074,13 +1073,13 @@
 	function cCOUPDAYBS() {
 		this.name = "COUPDAYBS";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cCOUPDAYBS.prototype = Object.create(cBaseFunction.prototype);
 	cCOUPDAYBS.prototype.constructor = cCOUPDAYBS;
+	cCOUPDAYBS.prototype.argumentsMin = 3;
+	cCOUPDAYBS.prototype.argumentsMax = 4;
 	cCOUPDAYBS.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUPDAYBS.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], frequency = arg[2], basis = arg[3] && !(arg[3] instanceof cEmpty) ?
@@ -1158,13 +1157,13 @@
 	function cCOUPDAYS() {
 		this.name = "COUPDAYS";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cCOUPDAYS.prototype = Object.create(cBaseFunction.prototype);
 	cCOUPDAYS.prototype.constructor = cCOUPDAYS;
+	cCOUPDAYS.prototype.argumentsMin = 3;
+	cCOUPDAYS.prototype.argumentsMax = 4;
 	cCOUPDAYS.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUPDAYS.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], frequency = arg[2], basis = arg[3] && !(arg[3] instanceof cEmpty) ?
@@ -1241,13 +1240,13 @@
 	function cCOUPDAYSNC() {
 		this.name = "COUPDAYSNC";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cCOUPDAYSNC.prototype = Object.create(cBaseFunction.prototype);
 	cCOUPDAYSNC.prototype.constructor = cCOUPDAYSNC;
+	cCOUPDAYSNC.prototype.argumentsMin = 3;
+	cCOUPDAYSNC.prototype.argumentsMax = 4;
 	cCOUPDAYSNC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUPDAYSNC.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], frequency = arg[2], basis = arg[3] && !(arg[3] instanceof cEmpty) ?
@@ -1324,13 +1323,13 @@
 	function cCOUPNCD() {
 		this.name = "COUPNCD";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cCOUPNCD.prototype = Object.create(cBaseFunction.prototype);
 	cCOUPNCD.prototype.constructor = cCOUPNCD;
+	cCOUPNCD.prototype.argumentsMin = 3;
+	cCOUPNCD.prototype.argumentsMax = 4;
 	cCOUPNCD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUPNCD.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], frequency = arg[2], basis = arg[3] && !(arg[3] instanceof cEmpty) ?
@@ -1409,13 +1408,13 @@
 	function cCOUPNUM() {
 		this.name = "COUPNUM";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cCOUPNUM.prototype = Object.create(cBaseFunction.prototype);
 	cCOUPNUM.prototype.constructor = cCOUPNUM;
+	cCOUPNUM.prototype.argumentsMin = 3;
+	cCOUPNUM.prototype.argumentsMax = 4;
 	cCOUPNUM.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUPNUM.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], frequency = arg[2], basis = arg[3] && !(arg[3] instanceof cEmpty) ?
@@ -1494,13 +1493,13 @@
 	function cCOUPPCD() {
 		this.name = "COUPPCD";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cCOUPPCD.prototype = Object.create(cBaseFunction.prototype);
 	cCOUPPCD.prototype.constructor = cCOUPPCD;
+	cCOUPPCD.prototype.argumentsMin = 3;
+	cCOUPPCD.prototype.argumentsMax = 4;
 	cCOUPPCD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUPPCD.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], frequency = arg[2], basis = arg[3] && !(arg[3] instanceof cEmpty) ?
@@ -1581,13 +1580,13 @@
 	function cCUMIPMT() {
 		this.name = "CUMIPMT";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cCUMIPMT.prototype = Object.create(cBaseFunction.prototype);
 	cCUMIPMT.prototype.constructor = cCUMIPMT;
+	cCUMIPMT.prototype.argumentsMin = 6;
+	cCUMIPMT.prototype.argumentsMax = 6;
 	cCUMIPMT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCUMIPMT.prototype.Calculate = function (arg) {
 		var rate = arg[0], nper = arg[1], pv = arg[2], startPeriod = arg[3], endPeriod = arg[4], type = arg[5];
@@ -1703,13 +1702,13 @@
 	function cCUMPRINC() {
 		this.name = "CUMPRINC";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cCUMPRINC.prototype = Object.create(cBaseFunction.prototype);
 	cCUMPRINC.prototype.constructor = cCUMPRINC;
+	cCUMPRINC.prototype.argumentsMin = 6;
+	cCUMPRINC.prototype.argumentsMax = 6;
 	cCUMPRINC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCUMPRINC.prototype.Calculate = function (arg) {
 		var rate = arg[0], nper = arg[1], pv = arg[2], startPeriod = arg[3], endPeriod = arg[4] &&
@@ -1827,13 +1826,13 @@
 	function cDB() {
 		this.name = "DB";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cDB.prototype = Object.create(cBaseFunction.prototype);
 	cDB.prototype.constructor = cDB;
+	cDB.prototype.argumentsMin = 4;
+	cDB.prototype.argumentsMax = 5;
 	cDB.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDB.prototype.Calculate = function (arg) {
 		var cost = arg[0], salvage = arg[1], life = arg[2], period = arg[3], month = arg[4] &&
@@ -1944,13 +1943,13 @@
 	function cDDB() {
 		this.name = "DDB";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cDDB.prototype = Object.create(cBaseFunction.prototype);
 	cDDB.prototype.constructor = cDDB;
+	cDDB.prototype.argumentsMin = 4;
+	cDDB.prototype.argumentsMax = 5;
 	cDDB.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDDB.prototype.Calculate = function (arg) {
 		var cost = arg[0], salvage = arg[1], life = arg[2], period = arg[3], factor = arg[4] &&
@@ -2039,13 +2038,13 @@
 	function cDISC() {
 		this.name = "DISC";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cDISC.prototype = Object.create(cBaseFunction.prototype);
 	cDISC.prototype.constructor = cDISC;
+	cDISC.prototype.argumentsMin = 4;
+	cDISC.prototype.argumentsMax = 5;
 	cDISC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDISC.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], pr = arg[2], redemption = arg[3], basis = arg[4] &&
@@ -2135,13 +2134,13 @@
 	function cDOLLARDE() {
 		this.name = "DOLLARDE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cDOLLARDE.prototype = Object.create(cBaseFunction.prototype);
 	cDOLLARDE.prototype.constructor = cDOLLARDE;
+	cDOLLARDE.prototype.argumentsMin = 2;
+	cDOLLARDE.prototype.argumentsMax = 2;
 	cDOLLARDE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDOLLARDE.prototype.Calculate = function (arg) {
 		var fractionalDollar = arg[0], fraction = arg[1];
@@ -2203,13 +2202,13 @@
 	function cDOLLARFR() {
 		this.name = "DOLLARFR";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cDOLLARFR.prototype = Object.create(cBaseFunction.prototype);
 	cDOLLARFR.prototype.constructor = cDOLLARFR;
+	cDOLLARFR.prototype.argumentsMin = 2;
+	cDOLLARFR.prototype.argumentsMax = 2;
 	cDOLLARFR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDOLLARFR.prototype.Calculate = function (arg) {
 		var decimalDollar = arg[0], fraction = arg[1];
@@ -2271,13 +2270,13 @@
 	function cDURATION() {
 		this.name = "DURATION";
 		this.value = null;
-		this.argumentsMin = 5;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cDURATION.prototype = Object.create(cBaseFunction.prototype);
 	cDURATION.prototype.constructor = cDURATION;
+	cDURATION.prototype.argumentsMin = 5;
+	cDURATION.prototype.argumentsMax = 6;
 	cDURATION.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDURATION.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], coupon = arg[2], yld = arg[3], frequency = arg[4], basis = arg[5] &&
@@ -2376,13 +2375,13 @@
 	function cEFFECT() {
 		this.name = "EFFECT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cEFFECT.prototype = Object.create(cBaseFunction.prototype);
 	cEFFECT.prototype.constructor = cEFFECT;
+	cEFFECT.prototype.argumentsMin = 2;
+	cEFFECT.prototype.argumentsMax = 2;
 	cEFFECT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cEFFECT.prototype.Calculate = function (arg) {
 		var nominalRate = arg[0], npery = arg[1];
@@ -2431,13 +2430,13 @@
 	function cFV() {
 		this.name = "FV";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cFV.prototype = Object.create(cBaseFunction.prototype);
 	cFV.prototype.constructor = cFV;
+	cFV.prototype.argumentsMin = 3;
+	cFV.prototype.argumentsMax = 5;
 	cFV.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cFV.prototype.Calculate = function (arg) {
 		var rate = arg[0], nper = arg[1], pmt = arg[2], pv = arg[3] ? arg[3] : new cNumber(0), type = arg[4] ? arg[4] :
@@ -2523,13 +2522,13 @@
 	function cFVSCHEDULE() {
 		this.name = "FVSCHEDULE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cFVSCHEDULE.prototype = Object.create(cBaseFunction.prototype);
 	cFVSCHEDULE.prototype.constructor = cFVSCHEDULE;
+	cFVSCHEDULE.prototype.argumentsMin = 2;
+	cFVSCHEDULE.prototype.argumentsMax = 2;
 	cFVSCHEDULE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cFVSCHEDULE.prototype.Calculate = function (arg) {
 		var principal = arg[0], schedule = arg[1], shedList = [];
@@ -2584,13 +2583,13 @@
 	function cINTRATE() {
 		this.name = "INTRATE";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cINTRATE.prototype = Object.create(cBaseFunction.prototype);
 	cINTRATE.prototype.constructor = cINTRATE;
+	cINTRATE.prototype.argumentsMin = 4;
+	cINTRATE.prototype.argumentsMax = 5;
 	cINTRATE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cINTRATE.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], investment = arg[2], redemption = arg[3], basis = arg[4] &&
@@ -2681,13 +2680,13 @@
 	function cIPMT() {
 		this.name = "IPMT";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cIPMT.prototype = Object.create(cBaseFunction.prototype);
 	cIPMT.prototype.constructor = cIPMT;
+	cIPMT.prototype.argumentsMin = 4;
+	cIPMT.prototype.argumentsMax = 6;
 	cIPMT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cIPMT.prototype.Calculate = function (arg) {
 		var rate = arg[0], per = arg[1], nper = arg[2], pv = arg[3], fv = arg[4] ? arg[4] :
@@ -2787,13 +2786,13 @@
 	function cIRR() {
 		this.name = "IRR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cIRR.prototype = Object.create(cBaseFunction.prototype);
 	cIRR.prototype.constructor = cIRR;
+	cIRR.prototype.argumentsMin = 1;
+	cIRR.prototype.argumentsMax = 2;
 	cIRR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cIRR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cNumber(0.1);
@@ -2923,13 +2922,13 @@
 	function cISPMT() {
 		this.name = "ISPMT";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cISPMT.prototype = Object.create(cBaseFunction.prototype);
 	cISPMT.prototype.constructor = cISPMT;
+	cISPMT.prototype.argumentsMin = 4;
+	cISPMT.prototype.argumentsMax = 4;
 	cISPMT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cISPMT.prototype.Calculate = function (arg) {
 		var rate = arg[0], per = arg[1], nper = arg[2], pv = arg[3];
@@ -2995,13 +2994,13 @@
 	function cMDURATION() {
 		this.name = "MDURATION";
 		this.value = null;
-		this.argumentsMin = 5;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cMDURATION.prototype = Object.create(cBaseFunction.prototype);
 	cMDURATION.prototype.constructor = cMDURATION;
+	cMDURATION.prototype.argumentsMin = 5;
+	cMDURATION.prototype.argumentsMax = 6;
 	cMDURATION.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMDURATION.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], coupon = arg[2], yld = arg[3], frequency = arg[4], basis = arg[5] &&
@@ -3104,13 +3103,13 @@
 	function cMIRR() {
 		this.name = "MIRR";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cMIRR.prototype = Object.create(cBaseFunction.prototype);
 	cMIRR.prototype.constructor = cMIRR;
+	cMIRR.prototype.argumentsMin = 3;
+	cMIRR.prototype.argumentsMax = 3;
 	cMIRR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMIRR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], invest = arg[1], reinvest = arg[2];
@@ -3218,13 +3217,13 @@
 	function cNOMINAL() {
 		this.name = "NOMINAL";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cNOMINAL.prototype = Object.create(cBaseFunction.prototype);
 	cNOMINAL.prototype.constructor = cNOMINAL;
+	cNOMINAL.prototype.argumentsMin = 2;
+	cNOMINAL.prototype.argumentsMax = 2;
 	cNOMINAL.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cNOMINAL.prototype.Calculate = function (arg) {
 		var effectRate = arg[0], npery = arg[1];
@@ -3277,13 +3276,13 @@
 	function cNPER() {
 		this.name = "NPER";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cNPER.prototype = Object.create(cBaseFunction.prototype);
 	cNPER.prototype.constructor = cNPER;
+	cNPER.prototype.argumentsMin = 3;
+	cNPER.prototype.argumentsMax = 5;
 	cNPER.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cNPER.prototype.Calculate = function (arg) {
 		var rate = arg[0], pmt = arg[1], pv = arg[2], fv = arg[3] ? arg[3] : new cNumber(0), type = arg[4] ? arg[4] :
@@ -3373,13 +3372,12 @@
 	function cNPV() {
 		this.name = "NPV";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cNPV.prototype = Object.create(cBaseFunction.prototype);
 	cNPV.prototype.constructor = cNPV;
+	cNPV.prototype.argumentsMin = 2;
 	cNPV.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cNPV.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], iStart = 1, res = 0, rate;
@@ -3452,13 +3450,13 @@
 	function cODDFPRICE() {
 		this.name = "ODDFPRICE";
 		this.value = null;
-		this.argumentsMin = 8;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 9;
 	}
 
 	cODDFPRICE.prototype = Object.create(cBaseFunction.prototype);
 	cODDFPRICE.prototype.constructor = cODDFPRICE;
+	cODDFPRICE.prototype.argumentsMin = 8;
+	cODDFPRICE.prototype.argumentsMax = 9;
 	cODDFPRICE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cODDFPRICE.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], issue = arg[2], first_coupon = arg[3], rate = arg[4], yld = arg[5], redemption = arg[6], frequency = arg[7], basis = arg[8] &&
@@ -3595,13 +3593,13 @@
 	function cODDFYIELD() {
 		this.name = "ODDFYIELD";
 		this.value = null;
-		this.argumentsMin = 8;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 9;
 	}
 
 	cODDFYIELD.prototype = Object.create(cBaseFunction.prototype);
 	cODDFYIELD.prototype.constructor = cODDFYIELD;
+	cODDFYIELD.prototype.argumentsMin = 8;
+	cODDFYIELD.prototype.argumentsMax = 9;
 	cODDFYIELD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cODDFYIELD.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], issue = arg[2], first_coupon = arg[3], rate = arg[4], pr = arg[5], redemption = arg[6], frequency = arg[7], basis = arg[8] &&
@@ -3804,13 +3802,13 @@
 	function cODDLPRICE() {
 		this.name = "ODDLPRICE";
 		this.value = null;
-		this.argumentsMin = 7;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 8;
 	}
 
 	cODDLPRICE.prototype = Object.create(cBaseFunction.prototype);
 	cODDLPRICE.prototype.constructor = cODDLPRICE;
+	cODDLPRICE.prototype.argumentsMin = 7;
+	cODDLPRICE.prototype.argumentsMax = 8;
 	cODDLPRICE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cODDLPRICE.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], last_interest = arg[2], rate = arg[3], yld = arg[4], redemption = arg[5], frequency = arg[6], basis = arg[7] &&
@@ -3943,13 +3941,13 @@
 	function cODDLYIELD() {
 		this.name = "ODDLYIELD";
 		this.value = null;
-		this.argumentsMin = 7;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 8;
 	}
 
 	cODDLYIELD.prototype = Object.create(cBaseFunction.prototype);
 	cODDLYIELD.prototype.constructor = cODDLYIELD;
+	cODDLYIELD.prototype.argumentsMin = 7;
+	cODDLYIELD.prototype.argumentsMax = 8;
 	cODDLYIELD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cODDLYIELD.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], last_interest = arg[2], rate = arg[3], pr = arg[4], redemption = arg[5], frequency = arg[6], basis = arg[7] &&
@@ -4083,13 +4081,13 @@
 	function cPMT() {
 		this.name = "PMT";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cPMT.prototype = Object.create(cBaseFunction.prototype);
 	cPMT.prototype.constructor = cPMT;
+	cPMT.prototype.argumentsMin = 3;
+	cPMT.prototype.argumentsMax = 5;
 	cPMT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPMT.prototype.Calculate = function (arg) {
 		var rate = arg[0], nper = arg[1], pv = arg[2], fv = arg[3] ? arg[3] : new cNumber(0), type = arg[4] ? arg[4] :
@@ -4180,13 +4178,13 @@
 	function cPPMT() {
 		this.name = "PPMT";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cPPMT.prototype = Object.create(cBaseFunction.prototype);
 	cPPMT.prototype.constructor = cPPMT;
+	cPPMT.prototype.argumentsMin = 4;
+	cPPMT.prototype.argumentsMax = 6;
 	cPPMT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPPMT.prototype.Calculate = function (arg) {
 		var rate = arg[0], per = arg[1], nper = arg[2], pv = arg[3], fv = arg[4] ? arg[4] :
@@ -4288,13 +4286,13 @@
 	function cPRICE() {
 		this.name = "PRICE";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 7;
 	}
 
 	cPRICE.prototype = Object.create(cBaseFunction.prototype);
 	cPRICE.prototype.constructor = cPRICE;
+	cPRICE.prototype.argumentsMin = 6;
+	cPRICE.prototype.argumentsMax = 7;
 	cPRICE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPRICE.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], rate = arg[2], yld = arg[3], redemption = arg[4], frequency = arg[5], basis = arg[6] &&
@@ -4404,13 +4402,13 @@
 	function cPRICEDISC() {
 		this.name = "PRICEDISC";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cPRICEDISC.prototype = Object.create(cBaseFunction.prototype);
 	cPRICEDISC.prototype.constructor = cPRICEDISC;
+	cPRICEDISC.prototype.argumentsMin = 4;
+	cPRICEDISC.prototype.argumentsMax = 5;
 	cPRICEDISC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPRICEDISC.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], discount = arg[2], redemption = arg[3], basis = arg[4] &&
@@ -4499,13 +4497,13 @@
 	function cPRICEMAT() {
 		this.name = "PRICEMAT";
 		this.value = null;
-		this.argumentsMin = 5;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cPRICEMAT.prototype = Object.create(cBaseFunction.prototype);
 	cPRICEMAT.prototype.constructor = cPRICEMAT;
+	cPRICEMAT.prototype.argumentsMin = 5;
+	cPRICEMAT.prototype.argumentsMax = 6;
 	cPRICEMAT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPRICEMAT.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], issue = arg[2], rate = arg[3], yld = arg[4], basis = arg[5] &&
@@ -4614,13 +4612,13 @@
 	function cPV() {
 		this.name = "PV";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cPV.prototype = Object.create(cBaseFunction.prototype);
 	cPV.prototype.constructor = cPV;
+	cPV.prototype.argumentsMin = 3;
+	cPV.prototype.argumentsMax = 5;
 	cPV.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPV.prototype.Calculate = function (arg) {
 		var rate = arg[0], nper = arg[1], pmt = arg[2], fv = arg[3] ? arg[3] : new cNumber(0), type = arg[4] ? arg[4] :
@@ -4706,13 +4704,13 @@
 	function cRATE() {
 		this.name = "RATE";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cRATE.prototype = Object.create(cBaseFunction.prototype);
 	cRATE.prototype.constructor = cRATE;
+	cRATE.prototype.argumentsMin = 3;
+	cRATE.prototype.argumentsMax = 6;
 	cRATE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cRATE.prototype.Calculate = function (arg) {
 
@@ -4809,13 +4807,13 @@
 	function cRECEIVED() {
 		this.name = "RECEIVED";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cRECEIVED.prototype = Object.create(cBaseFunction.prototype);
 	cRECEIVED.prototype.constructor = cRECEIVED;
+	cRECEIVED.prototype.argumentsMin = 4;
+	cRECEIVED.prototype.argumentsMax = 5;
 	cRECEIVED.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cRECEIVED.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], investment = arg[2], discount = arg[3], basis = arg[4] &&
@@ -4905,13 +4903,13 @@
 	function cSLN() {
 		this.name = "SLN";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cSLN.prototype = Object.create(cBaseFunction.prototype);
 	cSLN.prototype.constructor = cSLN;
+	cSLN.prototype.argumentsMin = 3;
+	cSLN.prototype.argumentsMax = 3;
 	cSLN.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cSLN.prototype.Calculate = function (arg) {
 		var cost = arg[0], salvage = arg[1], life = arg[2];
@@ -4973,13 +4971,13 @@
 	function cSYD() {
 		this.name = "SYD";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cSYD.prototype = Object.create(cBaseFunction.prototype);
 	cSYD.prototype.constructor = cSYD;
+	cSYD.prototype.argumentsMin = 4;
+	cSYD.prototype.argumentsMax = 4;
 	cSYD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cSYD.prototype.Calculate = function (arg) {
 		var cost = arg[0], salvage = arg[1], life = arg[2], per = arg[3];
@@ -5055,13 +5053,13 @@
 	function cTBILLEQ() {
 		this.name = "TBILLEQ";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cTBILLEQ.prototype = Object.create(cBaseFunction.prototype);
 	cTBILLEQ.prototype.constructor = cTBILLEQ;
+	cTBILLEQ.prototype.argumentsMin = 3;
+	cTBILLEQ.prototype.argumentsMax = 3;
 	cTBILLEQ.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cTBILLEQ.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], discount = arg[2];
@@ -5138,13 +5136,13 @@
 	function cTBILLPRICE() {
 		this.name = "TBILLPRICE";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cTBILLPRICE.prototype = Object.create(cBaseFunction.prototype);
 	cTBILLPRICE.prototype.constructor = cTBILLPRICE;
+	cTBILLPRICE.prototype.argumentsMin = 3;
+	cTBILLPRICE.prototype.argumentsMax = 3;
 	cTBILLPRICE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cTBILLPRICE.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], discount = arg[2];
@@ -5217,13 +5215,13 @@
 	function cTBILLYIELD() {
 		this.name = "TBILLYIELD";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cTBILLYIELD.prototype = Object.create(cBaseFunction.prototype);
 	cTBILLYIELD.prototype.constructor = cTBILLYIELD;
+	cTBILLYIELD.prototype.argumentsMin = 3;
+	cTBILLYIELD.prototype.argumentsMax = 3;
 	cTBILLYIELD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cTBILLYIELD.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], pr = arg[2];
@@ -5297,13 +5295,13 @@
 	function cVDB() {
 		this.name = "VDB";
 		this.value = null;
-		this.argumentsMin = 5;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 7;
 	}
 
 	cVDB.prototype = Object.create(cBaseFunction.prototype);
 	cVDB.prototype.constructor = cVDB;
+	cVDB.prototype.argumentsMin = 5;
+	cVDB.prototype.argumentsMax = 7;
 	cVDB.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cVDB.prototype.Calculate = function (arg) {
 		var cost = arg[0], salvage = arg[1], life = arg[2], startPeriod = arg[3], endPeriod = arg[4], factor = arg[5] &&
@@ -5476,13 +5474,13 @@
 	function cXIRR() {
 		this.name = "XIRR";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cXIRR.prototype = Object.create(cBaseFunction.prototype);
 	cXIRR.prototype.constructor = cXIRR;
+	cXIRR.prototype.argumentsMin = 2;
+	cXIRR.prototype.argumentsMax = 3;
 	cXIRR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cXIRR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cNumber(0.1);
@@ -5731,13 +5729,13 @@
 	function cXNPV() {
 		this.name = "XNPV";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cXNPV.prototype = Object.create(cBaseFunction.prototype);
 	cXNPV.prototype.constructor = cXNPV;
+	cXNPV.prototype.argumentsMin = 3;
+	cXNPV.prototype.argumentsMax = 3;
 	cXNPV.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cXNPV.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -5864,13 +5862,13 @@
 	function cYIELD() {
 		this.name = "YIELD";
 		this.value = null;
-		this.argumentsMin = 6;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 7;
 	}
 
 	cYIELD.prototype = Object.create(cBaseFunction.prototype);
 	cYIELD.prototype.constructor = cYIELD;
+	cYIELD.prototype.argumentsMin = 6;
+	cYIELD.prototype.argumentsMax = 7;
 	cYIELD.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cYIELD.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], rate = arg[2], pr = arg[3], redemption = arg[4], frequency = arg[5], basis = arg[6] &&
@@ -5982,13 +5980,13 @@
 	function cYIELDDISC() {
 		this.name = "YIELDDISC";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cYIELDDISC.prototype = Object.create(cBaseFunction.prototype);
 	cYIELDDISC.prototype.constructor = cYIELDDISC;
+	cYIELDDISC.prototype.argumentsMin = 4;
+	cYIELDDISC.prototype.argumentsMax = 5;
 	cYIELDDISC.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cYIELDDISC.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], pr = arg[2], redemption = arg[3], basis = arg[4] &&
@@ -6080,13 +6078,13 @@
 	function cYIELDMAT() {
 		this.name = "YIELDMAT";
 		this.value = null;
-		this.argumentsMin = 5;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 6;
 	}
 
 	cYIELDMAT.prototype = Object.create(cBaseFunction.prototype);
 	cYIELDMAT.prototype.constructor = cYIELDMAT;
+	cYIELDMAT.prototype.argumentsMin = 5;
+	cYIELDMAT.prototype.argumentsMax = 6;
 	cYIELDMAT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cYIELDMAT.prototype.Calculate = function (arg) {
 		var settlement = arg[0], maturity = arg[1], issue = arg[2], rate = arg[3], pr = arg[4], basis = arg[5] &&
diff --git a/cell/model/FormulaObjects/informationFunctions.js b/cell/model/FormulaObjects/informationFunctions.js
index 9e0e2e1ed..79b638118 100644
--- a/cell/model/FormulaObjects/informationFunctions.js
+++ b/cell/model/FormulaObjects/informationFunctions.js
@@ -37,7 +37,6 @@
  * @param {undefined} undefined
  */
 	function (window, undefined) {
-	var cElementType = AscCommonExcel.cElementType;
 	var cErrorType = AscCommonExcel.cErrorType;
 	var cNumber = AscCommonExcel.cNumber;
 	var cString = AscCommonExcel.cString;
@@ -62,13 +61,13 @@
 	function cERROR_TYPE() {
 		this.name = "ERROR.TYPE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cERROR_TYPE.prototype = Object.create(cBaseFunction.prototype);
 	cERROR_TYPE.prototype.constructor = cERROR_TYPE;
+	cERROR_TYPE.prototype.argumentsMin = 1;
+	cERROR_TYPE.prototype.argumentsMax = 1;
 	cERROR_TYPE.prototype.Calculate = function (arg) {
 		function typeError(elem) {
 			if (elem instanceof cError) {
@@ -127,13 +126,13 @@
 	function cISBLANK() {
 		this.name = "ISBLANK";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISBLANK.prototype = Object.create(cBaseFunction.prototype);
 	cISBLANK.prototype.constructor = cISBLANK;
+	cISBLANK.prototype.argumentsMin = 1;
+	cISBLANK.prototype.argumentsMax = 1;
 	cISBLANK.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -160,13 +159,13 @@
 	function cISERR() {
 		this.name = "ISERR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISERR.prototype = Object.create(cBaseFunction.prototype);
 	cISERR.prototype.constructor = cISERR;
+	cISERR.prototype.argumentsMin = 1;
+	cISERR.prototype.argumentsMax = 1;
 	cISERR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -196,13 +195,13 @@
 	function cISERROR() {
 		this.name = "ISERROR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISERROR.prototype = Object.create(cBaseFunction.prototype);
 	cISERROR.prototype.constructor = cISERROR;
+	cISERROR.prototype.argumentsMin = 1;
+	cISERROR.prototype.argumentsMax = 1;
 	cISERROR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -232,13 +231,13 @@
 	function cISEVEN() {
 		this.name = "ISEVEN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISEVEN.prototype = Object.create(cBaseFunction.prototype);
 	cISEVEN.prototype.constructor = cISEVEN;
+	cISEVEN.prototype.argumentsMin = 1;
+	cISEVEN.prototype.argumentsMax = 1;
 	cISEVEN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -273,13 +272,13 @@
 	function cISLOGICAL() {
 		this.name = "ISLOGICAL";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISLOGICAL.prototype = Object.create(cBaseFunction.prototype);
 	cISLOGICAL.prototype.constructor = cISLOGICAL;
+	cISLOGICAL.prototype.argumentsMin = 1;
+	cISLOGICAL.prototype.argumentsMax = 1;
 	cISLOGICAL.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -309,13 +308,13 @@
 	function cISNA() {
 		this.name = "ISNA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISNA.prototype = Object.create(cBaseFunction.prototype);
 	cISNA.prototype.constructor = cISNA;
+	cISNA.prototype.argumentsMin = 1;
+	cISNA.prototype.argumentsMax = 1;
 	cISNA.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -345,13 +344,13 @@
 	function cISNONTEXT() {
 		this.name = "ISNONTEXT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISNONTEXT.prototype = Object.create(cBaseFunction.prototype);
 	cISNONTEXT.prototype.constructor = cISNONTEXT;
+	cISNONTEXT.prototype.argumentsMin = 1;
+	cISNONTEXT.prototype.argumentsMax = 1;
 	cISNONTEXT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -380,13 +379,13 @@
 	function cISNUMBER() {
 		this.name = "ISNUMBER";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISNUMBER.prototype = Object.create(cBaseFunction.prototype);
 	cISNUMBER.prototype.constructor = cISNUMBER;
+	cISNUMBER.prototype.argumentsMin = 1;
+	cISNUMBER.prototype.argumentsMax = 1;
 	cISNUMBER.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -416,13 +415,13 @@
 	function cISODD() {
 		this.name = "ISODD";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISODD.prototype = Object.create(cBaseFunction.prototype);
 	cISODD.prototype.constructor = cISODD;
+	cISODD.prototype.argumentsMin = 1;
+	cISODD.prototype.argumentsMax = 1;
 	cISODD.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -457,13 +456,13 @@
 	function cISREF() {
 		this.name = "ISREF";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISREF.prototype = Object.create(cBaseFunction.prototype);
 	cISREF.prototype.constructor = cISREF;
+	cISREF.prototype.argumentsMin = 1;
+	cISREF.prototype.argumentsMax = 1;
 	cISREF.prototype.Calculate = function (arg) {
 		if ((arg[0] instanceof cRef || arg[0] instanceof cArea || arg[0] instanceof cArea3D ||
 			arg[0] instanceof cRef3D) && arg[0].isValid && arg[0].isValid()) {
@@ -485,13 +484,13 @@
 	function cISTEXT() {
 		this.name = "ISTEXT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cISTEXT.prototype = Object.create(cBaseFunction.prototype);
 	cISTEXT.prototype.constructor = cISTEXT;
+	cISTEXT.prototype.argumentsMin = 1;
+	cISTEXT.prototype.argumentsMax = 1;
 	cISTEXT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -521,13 +520,13 @@
 	function cN() {
 		this.name = "N";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cN.prototype = Object.create(cBaseFunction.prototype);
 	cN.prototype.constructor = cN;
+	cN.prototype.argumentsMin = 1;
+	cN.prototype.argumentsMax = 1;
 	cN.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
@@ -571,13 +570,12 @@
 	function cNA() {
 		this.name = "NA";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cNA.prototype = Object.create(cBaseFunction.prototype);
 	cNA.prototype.constructor = cNA;
+	cNA.prototype.argumentsMax = 0;
 	cNA.prototype.Calculate = function () {
 		return this.value = new cError(cErrorType.not_available);
 	};
@@ -594,13 +592,13 @@
 	function cTYPE() {
 		this.name = "TYPE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cTYPE.prototype = Object.create(cBaseFunction.prototype);
 	cTYPE.prototype.constructor = cTYPE;
+	cTYPE.prototype.argumentsMin = 1;
+	cTYPE.prototype.argumentsMax = 1;
 	cTYPE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
diff --git a/cell/model/FormulaObjects/logicalFunctions.js b/cell/model/FormulaObjects/logicalFunctions.js
index aca32c6fc..aa5878ab2 100644
--- a/cell/model/FormulaObjects/logicalFunctions.js
+++ b/cell/model/FormulaObjects/logicalFunctions.js
@@ -37,7 +37,6 @@
  * @param {undefined} undefined
  */
 	function (window, undefined) {
-	var cElementType = AscCommonExcel.cElementType;
 	var cErrorType = AscCommonExcel.cErrorType;
 	var cNumber = AscCommonExcel.cNumber;
 	var cString = AscCommonExcel.cString;
@@ -60,13 +59,12 @@
 	function cAND() {
 		this.name = "AND";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cAND.prototype = Object.create(cBaseFunction.prototype);
 	cAND.prototype.constructor = cAND;
+	cAND.prototype.argumentsMin = 1;
 	cAND.prototype.Calculate = function (arg) {
 		var argResult = null;
 		for (var i = 0; i < arg.length; i++) {
@@ -139,13 +137,12 @@
 	function cFALSE() {
 		this.name = "FALSE";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cFALSE.prototype = Object.create(cBaseFunction.prototype);
 	cFALSE.prototype.constructor = cFALSE;
+	cFALSE.prototype.argumentsMax = 0;
 	cFALSE.prototype.Calculate = function () {
 		return this.value = new cBool(false);
 	};
@@ -162,13 +159,13 @@
 	function cIF() {
 		this.name = "IF";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cIF.prototype = Object.create(cBaseFunction.prototype);
 	cIF.prototype.constructor = cIF;
+	cIF.prototype.argumentsMin = 1;
+	cIF.prototype.argumentsMax = 3;
 	cIF.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
 
@@ -208,13 +205,13 @@
 	function cIFERROR() {
 		this.name = "IFERROR";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cIFERROR.prototype = Object.create(cBaseFunction.prototype);
 	cIFERROR.prototype.constructor = cIFERROR;
+	cIFERROR.prototype.argumentsMin = 2;
+	cIFERROR.prototype.argumentsMax = 2;
 	cIFERROR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -246,13 +243,13 @@
 	function cNOT() {
 		this.name = "NOT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cNOT.prototype = Object.create(cBaseFunction.prototype);
 	cNOT.prototype.constructor = cNOT;
+	cNOT.prototype.argumentsMin = 1;
+	cNOT.prototype.argumentsMax = 1;
 	cNOT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArray) {
@@ -289,13 +286,12 @@
 	function cOR() {
 		this.name = "OR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cOR.prototype = Object.create(cBaseFunction.prototype);
 	cOR.prototype.constructor = cOR;
+	cOR.prototype.argumentsMin = 1;
 	cOR.prototype.Calculate = function (arg) {
 		var argResult = null;
 		for (var i = 0; i < arg.length; i++) {
@@ -365,13 +361,12 @@
 	function cTRUE() {
 		this.name = "TRUE";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cTRUE.prototype = Object.create(cBaseFunction.prototype);
 	cTRUE.prototype.constructor = cTRUE;
+	cTRUE.prototype.argumentsMax = 0;
 	cTRUE.prototype.Calculate = function () {
 		return this.value = new cBool(true);
 	};
diff --git a/cell/model/FormulaObjects/lookupandreferenceFunctions.js b/cell/model/FormulaObjects/lookupandreferenceFunctions.js
index 05f34202e..09b11a352 100644
--- a/cell/model/FormulaObjects/lookupandreferenceFunctions.js
+++ b/cell/model/FormulaObjects/lookupandreferenceFunctions.js
@@ -101,13 +101,13 @@
 	function cADDRESS() {
 		this.name = "ADDRESS";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cADDRESS.prototype = Object.create(cBaseFunction.prototype);
 	cADDRESS.prototype.constructor = cADDRESS;
+	cADDRESS.prototype.argumentsMin = 2;
+	cADDRESS.prototype.argumentsMax = 5;
 	cADDRESS.prototype.Calculate = function (arg) {
 		var rowNumber = arg[0], colNumber = arg[1], refType = arg[2] ? arg[2] : new cNumber(1), A1RefType = arg[3] ?
 			arg[3] : new cBool(true), sheetName = arg[4] ? arg[4] : new cEmpty();
@@ -232,13 +232,13 @@
 	function cCHOOSE() {
 		this.name = "CHOOSE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 30;
 	}
 
 	cCHOOSE.prototype = Object.create(cBaseFunction.prototype);
 	cCHOOSE.prototype.constructor = cCHOOSE;
+	cCHOOSE.prototype.argumentsMin = 2;
+	cCHOOSE.prototype.argumentsMax = 30;
 	cCHOOSE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -274,13 +274,12 @@
 	function cCOLUMN() {
 		this.name = "COLUMN";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCOLUMN.prototype = Object.create(cBaseFunction.prototype);
 	cCOLUMN.prototype.constructor = cCOLUMN;
+	cCOLUMN.prototype.argumentsMax = 1;
 	cCOLUMN.prototype.Calculate = function (arg) {
 		var arg0;
 		if (this.argumentsCurrent == 0) {
@@ -308,13 +307,13 @@
 	function cCOLUMNS() {
 		this.name = "COLUMNS";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCOLUMNS.prototype = Object.create(cBaseFunction.prototype);
 	cCOLUMNS.prototype.constructor = cCOLUMNS;
+	cCOLUMNS.prototype.argumentsMin = 1;
+	cCOLUMNS.prototype.argumentsMax = 1;
 	cCOLUMNS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		var range;
@@ -351,13 +350,13 @@
 	function cHLOOKUP() {
 		this.name = "HLOOKUP";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cHLOOKUP.prototype = Object.create(cBaseFunction.prototype);
 	cHLOOKUP.prototype.constructor = cHLOOKUP;
+	cHLOOKUP.prototype.argumentsMin = 3;
+	cHLOOKUP.prototype.argumentsMax = 4;
 	cHLOOKUP.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
 		var arg3 = this.argumentsCurrent == 4 ? arg[3].tocBool().value : true;
@@ -474,13 +473,13 @@
 	function cINDEX() {
 		this.name = "INDEX";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cINDEX.prototype = Object.create(cBaseFunction.prototype);
 	cINDEX.prototype.constructor = cINDEX;
+	cINDEX.prototype.argumentsMin = 2;
+	cINDEX.prototype.argumentsMax = 4;
 	cINDEX.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] && (cElementType.empty !== arg[1].type) ? arg[1] :
 			new cNumber(1), arg2 = arg[2] && (cElementType.empty !== arg[2].type) ? arg[2] :
@@ -561,13 +560,13 @@
 	function cINDIRECT() {
 		this.name = "INDIRECT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cINDIRECT.prototype = Object.create(cBaseFunction.prototype);
 	cINDIRECT.prototype.constructor = cINDIRECT;
+	cINDIRECT.prototype.argumentsMin = 1;
+	cINDIRECT.prototype.argumentsMax = 2;
 	cINDIRECT.prototype.Calculate = function (arg) {
 		var t = this, arg0 = arg[0].tocString(), arg1 = arg[1] ? arg[1] :
 			new cBool(true), r1 = arguments[1], wb = r1.worksheet.workbook, o = {
@@ -639,13 +638,13 @@
 	function cLOOKUP() {
 		this.name = "LOOKUP";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cLOOKUP.prototype = Object.create(cBaseFunction.prototype);
 	cLOOKUP.prototype.constructor = cLOOKUP;
+	cLOOKUP.prototype.argumentsMin = 2;
+	cLOOKUP.prototype.argumentsMax = 3;
 	cLOOKUP.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = this.argumentsCurrent == 2 ? arg1 : arg[2], resC = -1, resR = -1;
 
@@ -789,13 +788,13 @@
 	function cMATCH() {
 		this.name = "MATCH";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cMATCH.prototype = Object.create(cBaseFunction.prototype);
 	cMATCH.prototype.constructor = cMATCH;
+	cMATCH.prototype.argumentsMin = 2;
+	cMATCH.prototype.argumentsMax = 3;
 	cMATCH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cNumber(1);
 
@@ -899,13 +898,13 @@
 	function cOFFSET() {
 		this.name = "OFFSET";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 5;
 	}
 
 	cOFFSET.prototype = Object.create(cBaseFunction.prototype);
 	cOFFSET.prototype.constructor = cOFFSET;
+	cOFFSET.prototype.argumentsMin = 3;
+	cOFFSET.prototype.argumentsMax = 5;
 	cOFFSET.prototype.Calculate = function (arg) {
 
 		function validBBOX(bbox) {
@@ -1003,13 +1002,12 @@
 	function cROW() {
 		this.name = "ROW";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cROW.prototype = Object.create(cBaseFunction.prototype);
 	cROW.prototype.constructor = cROW;
+	cROW.prototype.argumentsMax = 1;
 	cROW.prototype.Calculate = function (arg) {
 		var arg0;
 		if (this.argumentsCurrent == 0) {
@@ -1037,13 +1035,13 @@
 	function cROWS() {
 		this.name = "ROWS";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cROWS.prototype = Object.create(cBaseFunction.prototype);
 	cROWS.prototype.constructor = cROWS;
+	cROWS.prototype.argumentsMin = 1;
+	cROWS.prototype.argumentsMax = 1;
 	cROWS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		var range;
@@ -1080,13 +1078,13 @@
 	function cTRANSPOSE() {
 		this.name = "TRANSPOSE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cTRANSPOSE.prototype = Object.create(cBaseFunction.prototype);
 	cTRANSPOSE.prototype.constructor = cTRANSPOSE;
+	cTRANSPOSE.prototype.argumentsMin = 1;
+	cTRANSPOSE.prototype.argumentsMax = 1;
 	cTRANSPOSE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cTRANSPOSE.prototype.Calculate = function (arg) {
 
@@ -1220,13 +1218,13 @@
 	function cVLOOKUP() {
 		this.name = "VLOOKUP";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cVLOOKUP.prototype = Object.create(cBaseFunction.prototype);
 	cVLOOKUP.prototype.constructor = cVLOOKUP;
+	cVLOOKUP.prototype.argumentsMin = 3;
+	cVLOOKUP.prototype.argumentsMax = 4;
 	cVLOOKUP.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
 		var arg3 = this.argumentsCurrent == 4 ? arg[3].tocBool().value : true;
diff --git a/cell/model/FormulaObjects/mathematicFunctions.js b/cell/model/FormulaObjects/mathematicFunctions.js
index ff2280278..9b33e9a87 100644
--- a/cell/model/FormulaObjects/mathematicFunctions.js
+++ b/cell/model/FormulaObjects/mathematicFunctions.js
@@ -88,13 +88,13 @@
 	function cABS() {
 		this.name = "ABS";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cABS.prototype = Object.create(cBaseFunction.prototype);
 	cABS.prototype.constructor = cABS;
+	cABS.prototype.argumentsMin = 1;
+	cABS.prototype.argumentsMax = 1;
 	cABS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -129,13 +129,13 @@
 	function cACOS() {
 		this.name = "ACOS";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cACOS.prototype = Object.create(cBaseFunction.prototype);
 	cACOS.prototype.constructor = cACOS;
+	cACOS.prototype.argumentsMin = 1;
+	cACOS.prototype.argumentsMax = 1;
 	cACOS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -172,13 +172,13 @@
 	function cACOSH() {
 		this.name = "ACOSH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cACOSH.prototype = Object.create(cBaseFunction.prototype);
 	cACOSH.prototype.constructor = cACOSH;
+	cACOSH.prototype.argumentsMin = 1;
+	cACOSH.prototype.argumentsMax = 1;
 	cACOSH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -215,13 +215,13 @@
 	function cASIN() {
 		this.name = "ASIN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cASIN.prototype = Object.create(cBaseFunction.prototype);
 	cASIN.prototype.constructor = cASIN;
+	cASIN.prototype.argumentsMin = 1;
+	cASIN.prototype.argumentsMax = 1;
 	cASIN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -258,13 +258,13 @@
 	function cASINH() {
 		this.name = "ASINH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cASINH.prototype = Object.create(cBaseFunction.prototype);
 	cASINH.prototype.constructor = cASINH;
+	cASINH.prototype.argumentsMin = 1;
+	cASINH.prototype.argumentsMax = 1;
 	cASINH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -301,13 +301,13 @@
 	function cATAN() {
 		this.name = "ATAN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cATAN.prototype = Object.create(cBaseFunction.prototype);
 	cATAN.prototype.constructor = cATAN;
+	cATAN.prototype.argumentsMin = 1;
+	cATAN.prototype.argumentsMax = 1;
 	cATAN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -344,13 +344,13 @@
 	function cATAN2() {
 		this.name = "ATAN2";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cATAN2.prototype = Object.create(cBaseFunction.prototype);
 	cATAN2.prototype.constructor = cATAN2;
+	cATAN2.prototype.argumentsMin = 2;
+	cATAN2.prototype.argumentsMax = 2;
 	cATAN2.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -421,13 +421,13 @@
 	function cATANH() {
 		this.name = "ATANH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cATANH.prototype = Object.create(cBaseFunction.prototype);
 	cATANH.prototype.constructor = cATANH;
+	cATANH.prototype.argumentsMin = 1;
+	cATANH.prototype.argumentsMax = 1;
 	cATANH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -464,13 +464,13 @@
 	function cCEILING() {
 		this.name = "CEILING";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cCEILING.prototype = Object.create(cBaseFunction.prototype);
 	cCEILING.prototype.constructor = cCEILING;
+	cCEILING.prototype.argumentsMin = 2;
+	cCEILING.prototype.argumentsMax = 2;
 	cCEILING.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -565,13 +565,13 @@
 	function cCOMBIN() {
 		this.name = "COMBIN";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cCOMBIN.prototype = Object.create(cBaseFunction.prototype);
 	cCOMBIN.prototype.constructor = cCOMBIN;
+	cCOMBIN.prototype.argumentsMin = 2;
+	cCOMBIN.prototype.argumentsMax = 2;
 	cCOMBIN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -656,13 +656,13 @@
 	function cCOS() {
 		this.name = "COS";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCOS.prototype = Object.create(cBaseFunction.prototype);
 	cCOS.prototype.constructor = cCOS;
+	cCOS.prototype.argumentsMin = 1;
+	cCOS.prototype.argumentsMax = 1;
 	cCOS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -699,13 +699,13 @@
 	function cCOSH() {
 		this.name = "COSH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCOSH.prototype = Object.create(cBaseFunction.prototype);
 	cCOSH.prototype.constructor = cCOSH;
+	cCOSH.prototype.argumentsMin = 1;
+	cCOSH.prototype.argumentsMax = 1;
 	cCOSH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -742,13 +742,13 @@
 	function cDEGREES() {
 		this.name = "DEGREES";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cDEGREES.prototype = Object.create(cBaseFunction.prototype);
 	cDEGREES.prototype.constructor = cDEGREES;
+	cDEGREES.prototype.argumentsMin = 1;
+	cDEGREES.prototype.argumentsMax = 1;
 	cDEGREES.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -797,13 +797,13 @@
 	function cEVEN() {
 		this.name = "EVEN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cEVEN.prototype = Object.create(cBaseFunction.prototype);
 	cEVEN.prototype.constructor = cEVEN;
+	cEVEN.prototype.argumentsMin = 1;
+	cEVEN.prototype.argumentsMax = 1;
 	cEVEN.prototype.Calculate = function (arg) {
 
 		function evenHelper(arg) {
@@ -863,13 +863,13 @@
 	function cEXP() {
 		this.name = "EXP";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cEXP.prototype = Object.create(cBaseFunction.prototype);
 	cEXP.prototype.constructor = cEXP;
+	cEXP.prototype.argumentsMin = 1;
+	cEXP.prototype.argumentsMax = 1;
 	cEXP.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -908,13 +908,13 @@
 	function cFACT() {
 		this.name = "FACT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cFACT.prototype = Object.create(cBaseFunction.prototype);
 	cFACT.prototype.constructor = cFACT;
+	cFACT.prototype.argumentsMin = 1;
+	cFACT.prototype.argumentsMax = 1;
 	cFACT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -958,13 +958,13 @@
 	function cFACTDOUBLE() {
 		this.name = "FACTDOUBLE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cFACTDOUBLE.prototype = Object.create(cBaseFunction.prototype);
 	cFACTDOUBLE.prototype.constructor = cFACTDOUBLE;
+	cFACTDOUBLE.prototype.argumentsMin = 1;
+	cFACTDOUBLE.prototype.argumentsMax = 1;
 	cFACTDOUBLE.prototype.Calculate = function (arg) {
 		function factDouble(n) {
 			if (n == 0) {
@@ -1027,13 +1027,13 @@
 	function cFLOOR() {
 		this.name = "FLOOR";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cFLOOR.prototype = Object.create(cBaseFunction.prototype);
 	cFLOOR.prototype.constructor = cFLOOR;
+	cFLOOR.prototype.argumentsMin = 2;
+	cFLOOR.prototype.argumentsMax = 2;
 	cFLOOR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1131,13 +1131,12 @@
 	function cGCD() {
 		this.name = "GCD";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cGCD.prototype = Object.create(cBaseFunction.prototype);
 	cGCD.prototype.constructor = cGCD;
+	cGCD.prototype.argumentsMin = 1;
 	cGCD.prototype.Calculate = function (arg) {
 
 		var _gcd = 0, argArr;
@@ -1232,13 +1231,13 @@
 	function cINT() {
 		this.name = "INT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cINT.prototype = Object.create(cBaseFunction.prototype);
 	cINT.prototype.constructor = cINT;
+	cINT.prototype.argumentsMin = 1;
+	cINT.prototype.argumentsMax = 1;
 	cINT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1290,13 +1289,12 @@
 	function cLCM() {
 		this.name = "LCM";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cLCM.prototype = Object.create(cBaseFunction.prototype);
 	cLCM.prototype.constructor = cLCM;
+	cLCM.prototype.argumentsMin = 1;
 	cLCM.prototype.Calculate = function (arg) {
 
 		var _lcm = 1, argArr;
@@ -1395,13 +1393,13 @@
 	function cLN() {
 		this.name = "LN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cLN.prototype = Object.create(cBaseFunction.prototype);
 	cLN.prototype.constructor = cLN;
+	cLN.prototype.argumentsMin = 1;
+	cLN.prototype.argumentsMax = 1;
 	cLN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1446,13 +1444,13 @@
 	function cLOG() {
 		this.name = "LOG";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cLOG.prototype = Object.create(cBaseFunction.prototype);
 	cLOG.prototype.constructor = cLOG;
+	cLOG.prototype.argumentsMin = 1;
+	cLOG.prototype.argumentsMax = 2;
 	cLOG.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1] ? arg[1] : new cNumber(10);
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1542,13 +1540,13 @@
 	function cLOG10() {
 		this.name = "LOG10";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cLOG10.prototype = Object.create(cBaseFunction.prototype);
 	cLOG10.prototype.constructor = cLOG10;
+	cLOG10.prototype.argumentsMin = 1;
+	cLOG10.prototype.argumentsMax = 1;
 	cLOG10.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1593,13 +1591,13 @@
 	function cMDETERM() {
 		this.name = "MDETERM";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cMDETERM.prototype = Object.create(cBaseFunction.prototype);
 	cMDETERM.prototype.constructor = cMDETERM;
+	cMDETERM.prototype.argumentsMin = 1;
+	cMDETERM.prototype.argumentsMax = 1;
 	cMDETERM.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMDETERM.prototype.Calculate = function (arg) {
 
@@ -1683,13 +1681,13 @@
 	function cMINVERSE() {
 		this.name = "MINVERSE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cMINVERSE.prototype = Object.create(cBaseFunction.prototype);
 	cMINVERSE.prototype.constructor = cMINVERSE;
+	cMINVERSE.prototype.argumentsMin = 1;
+	cMINVERSE.prototype.argumentsMax = 1;
 	cMINVERSE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMINVERSE.prototype.Calculate = function (arg) {
 
@@ -1832,13 +1830,13 @@
 	function cMMULT() {
 		this.name = "MMULT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cMMULT.prototype = Object.create(cBaseFunction.prototype);
 	cMMULT.prototype.constructor = cMMULT;
+	cMMULT.prototype.argumentsMin = 2;
+	cMMULT.prototype.argumentsMax = 2;
 	cMMULT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cMMULT.prototype.Calculate = function (arg) {
 
@@ -1906,13 +1904,13 @@
 	function cMOD() {
 		this.name = "MOD";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cMOD.prototype = Object.create(cBaseFunction.prototype);
 	cMOD.prototype.constructor = cMOD;
+	cMOD.prototype.argumentsMin = 2;
+	cMOD.prototype.argumentsMax = 2;
 	cMOD.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1997,13 +1995,13 @@
 	function cMROUND() {
 		this.name = "MROUND";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cMROUND.prototype = Object.create(cBaseFunction.prototype);
 	cMROUND.prototype.constructor = cMROUND;
+	cMROUND.prototype.argumentsMin = 2;
+	cMROUND.prototype.argumentsMax = 2;
 	cMROUND.prototype.Calculate = function (arg) {
 
 		var multiple;
@@ -2105,13 +2103,12 @@
 	function cMULTINOMIAL() {
 		this.name = "MULTINOMIAL";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMULTINOMIAL.prototype = Object.create(cBaseFunction.prototype);
 	cMULTINOMIAL.prototype.constructor = cMULTINOMIAL;
+	cMULTINOMIAL.prototype.argumentsMin = 1;
 	cMULTINOMIAL.prototype.Calculate = function (arg) {
 		var arg0 = new cNumber(0), fact = 1;
 
@@ -2202,13 +2199,13 @@
 	function cODD() {
 		this.name = "ODD";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cODD.prototype = Object.create(cBaseFunction.prototype);
 	cODD.prototype.constructor = cODD;
+	cODD.prototype.argumentsMin = 1;
+	cODD.prototype.argumentsMax = 1;
 	cODD.prototype.Calculate = function (arg) {
 
 		function oddHelper(arg) {
@@ -2268,13 +2265,12 @@
 	function cPI() {
 		this.name = "PI";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cPI.prototype = Object.create(cBaseFunction.prototype);
 	cPI.prototype.constructor = cPI;
+	cPI.prototype.argumentsMax = 0;
 	cPI.prototype.Calculate = function () {
 		return new cNumber(Math.PI);
 	};
@@ -2291,13 +2287,13 @@
 	function cPOWER() {
 		this.name = "POWER";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cPOWER.prototype = Object.create(cBaseFunction.prototype);
 	cPOWER.prototype.constructor = cPOWER;
+	cPOWER.prototype.argumentsMin = 2;
+	cPOWER.prototype.argumentsMax = 2;
 	cPOWER.prototype.Calculate = function (arg) {
 
 		function powerHelper(a, b) {
@@ -2377,13 +2373,12 @@
 	function cPRODUCT() {
 		this.name = "PRODUCT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cPRODUCT.prototype = Object.create(cBaseFunction.prototype);
 	cPRODUCT.prototype.constructor = cPRODUCT;
+	cPRODUCT.prototype.argumentsMin = 1;
 	cPRODUCT.prototype.Calculate = function (arg) {
 		var element, arg0 = new cNumber(1);
 		for (var i = 0; i < arg.length; i++) {
@@ -2433,13 +2428,13 @@
 	function cQUOTIENT() {
 		this.name = "QUOTIENT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cQUOTIENT.prototype = Object.create(cBaseFunction.prototype);
 	cQUOTIENT.prototype.constructor = cQUOTIENT;
+	cQUOTIENT.prototype.argumentsMin = 2;
+	cQUOTIENT.prototype.argumentsMax = 2;
 	cQUOTIENT.prototype.Calculate = function (arg) {
 
 		function quotient(a, b) {
@@ -2516,13 +2511,13 @@
 	function cRADIANS() {
 		this.name = "RADIANS";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cRADIANS.prototype = Object.create(cBaseFunction.prototype);
 	cRADIANS.prototype.constructor = cRADIANS;
+	cRADIANS.prototype.argumentsMin = 1;
+	cRADIANS.prototype.argumentsMax = 1;
 	cRADIANS.prototype.Calculate = function (arg) {
 
 		function radiansHelper(ang) {
@@ -2563,13 +2558,12 @@
 	function cRAND() {
 		this.name = "RAND";
 		this.value = null;
-		this.argumentsMin = 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 0;
 	}
 
 	cRAND.prototype = Object.create(cBaseFunction.prototype);
 	cRAND.prototype.constructor = cRAND;
+	cRAND.prototype.argumentsMax = 0;
 	cRAND.prototype.Calculate = function () {
 		return this.setCA(new cNumber(Math.random()), true);
 	};
@@ -2586,13 +2580,13 @@
 	function cRANDBETWEEN() {
 		this.name = "RANDBETWEEN";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cRANDBETWEEN.prototype = Object.create(cBaseFunction.prototype);
 	cRANDBETWEEN.prototype.constructor = cRANDBETWEEN;
+	cRANDBETWEEN.prototype.argumentsMin = 2;
+	cRANDBETWEEN.prototype.argumentsMax = 2;
 	cRANDBETWEEN.prototype.Calculate = function (arg) {
 
 		function randBetween(a, b) {
@@ -2665,13 +2659,13 @@
 	function cROMAN() {
 		this.name = "ROMAN";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cROMAN.prototype = Object.create(cBaseFunction.prototype);
 	cROMAN.prototype.constructor = cROMAN;
+	cROMAN.prototype.argumentsMin = 2;
+	cROMAN.prototype.argumentsMax = 2;
 	cROMAN.prototype.Calculate = function (arg) {
 		function roman(num, mode) {
 			if ((mode >= 0) && (mode < 5) && (num >= 0) && (num < 4000)) {
@@ -2779,13 +2773,13 @@
 	function cROUND() {
 		this.name = "ROUND";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cROUND.prototype = Object.create(cBaseFunction.prototype);
 	cROUND.prototype.constructor = cROUND;
+	cROUND.prototype.argumentsMin = 2;
+	cROUND.prototype.argumentsMax = 2;
 	cROUND.prototype.Calculate = function (arg) {
 
 		function SignZeroPositive(number) {
@@ -2931,13 +2925,13 @@
 	function cROUNDDOWN() {
 		this.name = "ROUNDDOWN";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cROUNDDOWN.prototype = Object.create(cBaseFunction.prototype);
 	cROUNDDOWN.prototype.constructor = cROUNDDOWN;
+	cROUNDDOWN.prototype.argumentsMin = 2;
+	cROUNDDOWN.prototype.argumentsMax = 2;
 	cROUNDDOWN.prototype.Calculate = function (arg) {
 		function rounddownHelper(number, num_digits) {
 			if (num_digits > AscCommonExcel.cExcelMaxExponent) {
@@ -3059,13 +3053,13 @@
 	function cROUNDUP() {
 		this.name = "ROUNDUP";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cROUNDUP.prototype = Object.create(cBaseFunction.prototype);
 	cROUNDUP.prototype.constructor = cROUNDUP;
+	cROUNDUP.prototype.argumentsMin = 2;
+	cROUNDUP.prototype.argumentsMax = 2;
 	cROUNDUP.prototype.Calculate = function (arg) {
 		function roundupHelper(number, num_digits) {
 			if (num_digits > AscCommonExcel.cExcelMaxExponent) {
@@ -3187,13 +3181,13 @@
 	function cSERIESSUM() {
 		this.name = "SERIESSUM";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cSERIESSUM.prototype = Object.create(cBaseFunction.prototype);
 	cSERIESSUM.prototype.constructor = cSERIESSUM;
+	cSERIESSUM.prototype.argumentsMin = 4;
+	cSERIESSUM.prototype.argumentsMax = 4;
 	cSERIESSUM.prototype.Calculate = function (arg) {
 
 		function SERIESSUM(x, n, m, a) {
@@ -3263,13 +3257,13 @@
 	function cSIGN() {
 		this.name = "SIGN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cSIGN.prototype = Object.create(cBaseFunction.prototype);
 	cSIGN.prototype.constructor = cSIGN;
+	cSIGN.prototype.argumentsMin = 1;
+	cSIGN.prototype.argumentsMax = 1;
 	cSIGN.prototype.Calculate = function (arg) {
 
 		function signHelper(arg) {
@@ -3319,13 +3313,13 @@
 	function cSIN() {
 		this.name = "SIN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cSIN.prototype = Object.create(cBaseFunction.prototype);
 	cSIN.prototype.constructor = cSIN;
+	cSIN.prototype.argumentsMin = 1;
+	cSIN.prototype.argumentsMax = 1;
 	cSIN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -3362,13 +3356,13 @@
 	function cSINH() {
 		this.name = "SINH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cSINH.prototype = Object.create(cBaseFunction.prototype);
 	cSINH.prototype.constructor = cSINH;
+	cSINH.prototype.argumentsMin = 1;
+	cSINH.prototype.argumentsMax = 1;
 	cSINH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -3405,13 +3399,13 @@
 	function cSQRT() {
 		this.name = "SQRT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cSQRT.prototype = Object.create(cBaseFunction.prototype);
 	cSQRT.prototype.constructor = cSQRT;
+	cSQRT.prototype.argumentsMin = 1;
+	cSQRT.prototype.argumentsMax = 1;
 	cSQRT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -3448,13 +3442,13 @@
 	function cSQRTPI() {
 		this.name = "SQRTPI";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cSQRTPI.prototype = Object.create(cBaseFunction.prototype);
 	cSQRTPI.prototype.constructor = cSQRTPI;
+	cSQRTPI.prototype.argumentsMin = 1;
+	cSQRTPI.prototype.argumentsMax = 1;
 	cSQRTPI.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -3491,13 +3485,12 @@
 	function cSUBTOTAL() {
 		this.name = "SUBTOTAL";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSUBTOTAL.prototype = Object.create(cBaseFunction.prototype);
 	cSUBTOTAL.prototype.constructor = cSUBTOTAL;
+	cSUBTOTAL.prototype.argumentsMin = 1;
 	cSUBTOTAL.prototype.Calculate = function (arg) {
 		var f, exclude = false, arg0 = arg[0];
 
@@ -3591,13 +3584,12 @@
 	function cSUM() {
 		this.name = "SUM";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSUM.prototype = Object.create(cBaseFunction.prototype);
 	cSUM.prototype.constructor = cSUM;
+	cSUM.prototype.argumentsMin = 1;
 	cSUM.prototype.Calculate = function (arg) {
 		var element, _arg, arg0 = new cNumber(0);
 		for (var i = 0; i < arg.length; i++) {
@@ -3651,13 +3643,13 @@
 	function cSUMIF() {
 		this.name = "SUMIF";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cSUMIF.prototype = Object.create(cBaseFunction.prototype);
 	cSUMIF.prototype.constructor = cSUMIF;
+	cSUMIF.prototype.argumentsMin = 2;
+	cSUMIF.prototype.argumentsMax = 3;
 	cSUMIF.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : arg[0], _sum = 0, matchingInfo;
 		if (cElementType.cell !== arg0.type && cElementType.cell3D !== arg0.type &&
@@ -3726,13 +3718,12 @@
 	function cSUMIFS() {
 		this.name = "SUMIFS";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSUMIFS.prototype = Object.create(cBaseFunction.prototype);
 	cSUMIFS.prototype.constructor = cSUMIFS;
+	cSUMIFS.prototype.argumentsMin = 3;
 	cSUMIFS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (cElementType.cell !== arg0.type && cElementType.cell3D !== arg0.type &&
@@ -3822,13 +3813,12 @@
 	function cSUMPRODUCT() {
 		this.name = "SUMPRODUCT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSUMPRODUCT.prototype = Object.create(cBaseFunction.prototype);
 	cSUMPRODUCT.prototype.constructor = cSUMPRODUCT;
+	cSUMPRODUCT.prototype.argumentsMin = 1;
 	cSUMPRODUCT.prototype.Calculate = function (arg) {
 		var arg0 = new cNumber(0), resArr = [], col = 0, row = 0, res = 1, _res = [], i;
 
@@ -3898,13 +3888,12 @@
 	function cSUMSQ() {
 		this.name = "SUMSQ";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSUMSQ.prototype = Object.create(cBaseFunction.prototype);
 	cSUMSQ.prototype.constructor = cSUMSQ;
+	cSUMSQ.prototype.argumentsMin = 1;
 	cSUMSQ.prototype.Calculate = function (arg) {
 		var arg0 = new cNumber(0), _arg;
 
@@ -3959,13 +3948,13 @@
 	function cSUMX2MY2() {
 		this.name = "SUMX2MY2";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cSUMX2MY2.prototype = Object.create(cBaseFunction.prototype);
 	cSUMX2MY2.prototype.constructor = cSUMX2MY2;
+	cSUMX2MY2.prototype.argumentsMin = 2;
+	cSUMX2MY2.prototype.argumentsMax = 2;
 	cSUMX2MY2.prototype.Calculate = function (arg) {
 
 		function sumX2MY2(a, b, _3d) {
@@ -4047,13 +4036,13 @@
 	function cSUMX2PY2() {
 		this.name = "SUMX2PY2";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cSUMX2PY2.prototype = Object.create(cBaseFunction.prototype);
 	cSUMX2PY2.prototype.constructor = cSUMX2PY2;
+	cSUMX2PY2.prototype.argumentsMin = 2;
+	cSUMX2PY2.prototype.argumentsMax = 2;
 	cSUMX2PY2.prototype.Calculate = function (arg) {
 
 		function sumX2MY2(a, b, _3d) {
@@ -4135,13 +4124,13 @@
 	function cSUMXMY2() {
 		this.name = "SUMXMY2";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cSUMXMY2.prototype = Object.create(cBaseFunction.prototype);
 	cSUMXMY2.prototype.constructor = cSUMXMY2;
+	cSUMXMY2.prototype.argumentsMin = 2;
+	cSUMXMY2.prototype.argumentsMax = 2;
 	cSUMXMY2.prototype.Calculate = function (arg) {
 
 		function sumX2MY2(a, b, _3d) {
@@ -4223,13 +4212,13 @@
 	function cTAN() {
 		this.name = "TAN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cTAN.prototype = Object.create(cBaseFunction.prototype);
 	cTAN.prototype.constructor = cTAN;
+	cTAN.prototype.argumentsMin = 1;
+	cTAN.prototype.argumentsMax = 1;
 	cTAN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -4266,13 +4255,13 @@
 	function cTANH() {
 		this.name = "TANH";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cTANH.prototype = Object.create(cBaseFunction.prototype);
 	cTANH.prototype.constructor = cTANH;
+	cTANH.prototype.argumentsMin = 1;
+	cTANH.prototype.argumentsMax = 1;
 	cTANH.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -4309,13 +4298,13 @@
 	function cTRUNC() {
 		this.name = "TRUNC";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cTRUNC.prototype = Object.create(cBaseFunction.prototype);
 	cTRUNC.prototype.constructor = cTRUNC;
+	cTRUNC.prototype.argumentsMin = 1;
+	cTRUNC.prototype.argumentsMax = 2;
 	cTRUNC.prototype.Calculate = function (arg) {
 
 		function truncHelper(a, b) {
diff --git a/cell/model/FormulaObjects/parserFormula.js b/cell/model/FormulaObjects/parserFormula.js
index d1499a735..5aaf86498 100644
--- a/cell/model/FormulaObjects/parserFormula.js
+++ b/cell/model/FormulaObjects/parserFormula.js
@@ -2278,16 +2278,16 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
 	};
 
 	/** @constructor */
-	function cBaseFunction(name, argMin, argMax) {
+	function cBaseFunction(name) {
 		this.name = name;
 		this.value = null;
-		this.argumentsMin = argMin ? argMin : 0;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = argMax ? argMax : 255;
 //    this.isXLFN = rx_sFuncPref.test(this.name);
 	}
 
 	cBaseFunction.prototype.type = cElementType.func;
+	cBaseFunction.prototype.argumentsMin = 0;
+	cBaseFunction.prototype.argumentsMax = 255;
 	cBaseFunction.prototype.numFormat = AscCommonExcel.cNumFormatFirstCell;
 	cBaseFunction.prototype.Calculate = function () {
 		this.value = new cError(cErrorType.wrong_name);
diff --git a/cell/model/FormulaObjects/statisticalFunctions.js b/cell/model/FormulaObjects/statisticalFunctions.js
index 1c23fcb3b..8e1c2a589 100644
--- a/cell/model/FormulaObjects/statisticalFunctions.js
+++ b/cell/model/FormulaObjects/statisticalFunctions.js
@@ -329,13 +329,12 @@
 	function cAVEDEV() {
 		this.name = "AVEDEV";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cAVEDEV.prototype = Object.create(cBaseFunction.prototype);
 	cAVEDEV.prototype.constructor = cAVEDEV;
+	cAVEDEV.prototype.argumentsMin = 1;
 	cAVEDEV.prototype.Calculate = function (arg) {
 		var count = 0, sum = new cNumber(0), arrX = [], i;
 		for (i = 0; i < arg.length; i++) {
@@ -396,13 +395,12 @@
 	function cAVERAGE() {
 		this.name = "AVERAGE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cAVERAGE.prototype = Object.create(cBaseFunction.prototype);
 	cAVERAGE.prototype.constructor = cAVERAGE;
+	cAVERAGE.prototype.argumentsMin = 1;
 	cAVERAGE.prototype.Calculate = function (arg) {
 		var count = 0, sum = new cNumber(0);
 		for (var i = 0; i < arg.length; i++) {
@@ -470,13 +468,12 @@
 	function cAVERAGEA() {
 		this.name = "AVERAGEA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cAVERAGEA.prototype = Object.create(cBaseFunction.prototype);
 	cAVERAGEA.prototype.constructor = cAVERAGEA;
+	cAVERAGEA.prototype.argumentsMin = 1;
 	cAVERAGEA.prototype.Calculate = function (arg) {
 		var count = 0, sum = new cNumber(0);
 		for (var i = 0; i < arg.length; i++) {
@@ -537,13 +534,13 @@
 	function cAVERAGEIF() {
 		this.name = "AVERAGEIF";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cAVERAGEIF.prototype = Object.create(cBaseFunction.prototype);
 	cAVERAGEIF.prototype.constructor = cAVERAGEIF;
+	cAVERAGEIF.prototype.argumentsMin = 2;
+	cAVERAGEIF.prototype.argumentsMax = 3;
 	cAVERAGEIF.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : arg[0], _sum = 0, _count = 0, matchingInfo, ws;
 		if ((cElementType.cell !== arg0.type && cElementType.cell3D !== arg0.type &&
@@ -623,13 +620,12 @@
 	function cAVERAGEIFS() {
 		this.name = "AVERAGEIFS";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cAVERAGEIFS.prototype = Object.create(cBaseFunction.prototype);
 	cAVERAGEIFS.prototype.constructor = cAVERAGEIFS;
+	cAVERAGEIFS.prototype.argumentsMin = 3;
 	cAVERAGEIFS.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (cElementType.cell !== arg0.type && cElementType.cell3D !== arg0.type &&
@@ -733,13 +729,13 @@
 	function cBINOMDIST() {
 		this.name = "BINOMDIST";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cBINOMDIST.prototype = Object.create(cBaseFunction.prototype);
 	cBINOMDIST.prototype.constructor = cBINOMDIST;
+	cBINOMDIST.prototype.argumentsMin = 4;
+	cBINOMDIST.prototype.argumentsMax = 4;
 	cBINOMDIST.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], arg3 = arg[3];
 
@@ -852,13 +848,13 @@
 	function cCONFIDENCE() {
 		this.name = "CONFIDENCE";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cCONFIDENCE.prototype = Object.create(cBaseFunction.prototype);
 	cCONFIDENCE.prototype.constructor = cCONFIDENCE;
+	cCONFIDENCE.prototype.argumentsMin = 3;
+	cCONFIDENCE.prototype.argumentsMax = 3;
 	cCONFIDENCE.prototype.Calculate = function (arg) {
 
 		var alpha = arg[0], stdev_sigma = arg[1], size = arg[2];
@@ -915,13 +911,13 @@
 	function cCORREL() {
 		this.name = "CORREL";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cCORREL.prototype = Object.create(cBaseFunction.prototype);
 	cCORREL.prototype.constructor = cCORREL;
+	cCORREL.prototype.argumentsMin = 2;
+	cCORREL.prototype.argumentsMax = 2;
 	cCORREL.prototype.Calculate = function (arg) {
 
 		function correl(x, y) {
@@ -1001,13 +997,12 @@
 	function cCOUNT() {
 		this.name = "COUNT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCOUNT.prototype = Object.create(cBaseFunction.prototype);
 	cCOUNT.prototype.constructor = cCOUNT;
+	cCOUNT.prototype.argumentsMin = 1;
 	cCOUNT.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUNT.prototype.Calculate = function (arg) {
 		var count = 0;
@@ -1057,13 +1052,12 @@
 	function cCOUNTA() {
 		this.name = "COUNTA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCOUNTA.prototype = Object.create(cBaseFunction.prototype);
 	cCOUNTA.prototype.constructor = cCOUNTA;
+	cCOUNTA.prototype.argumentsMin = 1;
 	cCOUNTA.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUNTA.prototype.Calculate = function (arg) {
 		var element, count = 0;
@@ -1108,13 +1102,13 @@
 	function cCOUNTBLANK() {
 		this.name = "COUNTBLANK";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCOUNTBLANK.prototype = Object.create(cBaseFunction.prototype);
 	cCOUNTBLANK.prototype.constructor = cCOUNTBLANK;
+	cCOUNTBLANK.prototype.argumentsMin = 1;
+	cCOUNTBLANK.prototype.argumentsMax = 1;
 	cCOUNTBLANK.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cCOUNTBLANK.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
@@ -1139,13 +1133,13 @@
 	function cCOUNTIF() {
 		this.name = "COUNTIF";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cCOUNTIF.prototype = Object.create(cBaseFunction.prototype);
 	cCOUNTIF.prototype.constructor = cCOUNTIF;
+	cCOUNTIF.prototype.argumentsMin = 2;
+	cCOUNTIF.prototype.argumentsMax = 2;
 	cCOUNTIF.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], _count = 0, matchingInfo;
 		if (cElementType.cell !== arg0.type && cElementType.cell3D !== arg0.type &&
@@ -1196,13 +1190,13 @@
 	function cCOUNTIFS() {
 		this.name = "COUNTIFS";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 256;
 	}
 
 	cCOUNTIFS.prototype = Object.create(cBaseFunction.prototype);
 	cCOUNTIFS.prototype.constructor = cCOUNTIFS;
+	cCOUNTIFS.prototype.argumentsMin = 2;
+	cCOUNTIFS.prototype.argumentsMax = 254;
 	cCOUNTIFS.prototype.Calculate = function (arg) {
 		var i, j, arg0, arg1, matchingInfo, arg0Matrix, arg1Matrix, _count = 0;
 		for (var k = 0; k < arg.length; k += 2) {
@@ -1269,13 +1263,13 @@
 	function cCOVAR() {
 		this.name = "COVAR";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cCOVAR.prototype = Object.create(cBaseFunction.prototype);
 	cCOVAR.prototype.constructor = cCOVAR;
+	cCOVAR.prototype.argumentsMin = 2;
+	cCOVAR.prototype.argumentsMax = 2;
 	cCOVAR.prototype.Calculate = function (arg) {
 
 		function covar(x, y) {
@@ -1349,13 +1343,13 @@
 	function cCRITBINOM() {
 		this.name = "CRITBINOM";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cCRITBINOM.prototype = Object.create(cBaseFunction.prototype);
 	cCRITBINOM.prototype.constructor = cCRITBINOM;
+	cCRITBINOM.prototype.argumentsMin = 3;
+	cCRITBINOM.prototype.argumentsMax = 3;
 	cCRITBINOM.prototype.Calculate = function (arg) {
 		var n = arg[0], p = arg[1], alpha = arg[2];                    // alpha
 
@@ -1439,13 +1433,12 @@
 	function cDEVSQ() {
 		this.name = "DEVSQ";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cDEVSQ.prototype = Object.create(cBaseFunction.prototype);
 	cDEVSQ.prototype.constructor = cDEVSQ;
+	cDEVSQ.prototype.argumentsMin = 1;
 	cDEVSQ.prototype.Calculate = function (arg) {
 
 		function devsq(x) {
@@ -1519,13 +1512,13 @@
 	function cEXPONDIST() {
 		this.name = "EXPONDIST";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cEXPONDIST.prototype = Object.create(cBaseFunction.prototype);
 	cEXPONDIST.prototype.constructor = cEXPONDIST;
+	cEXPONDIST.prototype.argumentsMin = 3;
+	cEXPONDIST.prototype.argumentsMax = 3;
 	cEXPONDIST.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], arg3 = arg[3];
 
@@ -1606,13 +1599,13 @@
 	function cFISHER() {
 		this.name = "FISHER";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cFISHER.prototype = Object.create(cBaseFunction.prototype);
 	cFISHER.prototype.constructor = cFISHER;
+	cFISHER.prototype.argumentsMin = 1;
+	cFISHER.prototype.argumentsMax = 1;
 	cFISHER.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -1655,13 +1648,13 @@
 	function cFISHERINV() {
 		this.name = "FISHERINV";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cFISHERINV.prototype = Object.create(cBaseFunction.prototype);
 	cFISHERINV.prototype.constructor = cFISHERINV;
+	cFISHERINV.prototype.argumentsMin = 1;
+	cFISHERINV.prototype.argumentsMax = 1;
 	cFISHERINV.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -1704,13 +1697,13 @@
 	function cFORECAST() {
 		this.name = "FORECAST";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cFORECAST.prototype = Object.create(cBaseFunction.prototype);
 	cFORECAST.prototype.constructor = cFORECAST;
+	cFORECAST.prototype.argumentsMin = 3;
+	cFORECAST.prototype.argumentsMax = 3;
 	cFORECAST.prototype.Calculate = function (arg) {
 
 		function forecast(fx, y, x) {
@@ -1802,13 +1795,13 @@
 	function cFREQUENCY() {
 		this.name = "FREQUENCY";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cFREQUENCY.prototype = Object.create(cBaseFunction.prototype);
 	cFREQUENCY.prototype.constructor = cFREQUENCY;
+	cFREQUENCY.prototype.argumentsMin = 2;
+	cFREQUENCY.prototype.argumentsMax = 2;
 	cFREQUENCY.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cFREQUENCY.prototype.Calculate = function (arg) {
 
@@ -1924,13 +1917,13 @@
 	function cGAMMALN() {
 		this.name = "GAMMALN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cGAMMALN.prototype = Object.create(cBaseFunction.prototype);
 	cGAMMALN.prototype.constructor = cGAMMALN;
+	cGAMMALN.prototype.argumentsMin = 1;
+	cGAMMALN.prototype.argumentsMax = 1;
 	cGAMMALN.prototype.Calculate = function (arg) {
 
 
@@ -1973,13 +1966,12 @@
 	function cGEOMEAN() {
 		this.name = "GEOMEAN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cGEOMEAN.prototype = Object.create(cBaseFunction.prototype);
 	cGEOMEAN.prototype.constructor = cGEOMEAN;
+	cGEOMEAN.prototype.argumentsMin = 1;
 	cGEOMEAN.prototype.Calculate = function (arg) {
 
 		function geommean(x) {
@@ -2062,13 +2054,12 @@
 	function cHARMEAN() {
 		this.name = "HARMEAN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cHARMEAN.prototype = Object.create(cBaseFunction.prototype);
 	cHARMEAN.prototype.constructor = cHARMEAN;
+	cHARMEAN.prototype.argumentsMin = 1;
 	cHARMEAN.prototype.Calculate = function (arg) {
 
 		function harmmean(x) {
@@ -2146,13 +2137,13 @@
 	function cHYPGEOMDIST() {
 		this.name = "HYPGEOMDIST";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cHYPGEOMDIST.prototype = Object.create(cBaseFunction.prototype);
 	cHYPGEOMDIST.prototype.constructor = cHYPGEOMDIST;
+	cHYPGEOMDIST.prototype.argumentsMin = 4;
+	cHYPGEOMDIST.prototype.argumentsMax = 4;
 	cHYPGEOMDIST.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], arg3 = arg[3];
 
@@ -2224,13 +2215,13 @@
 	function cINTERCEPT() {
 		this.name = "INTERCEPT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cINTERCEPT.prototype = Object.create(cBaseFunction.prototype);
 	cINTERCEPT.prototype.constructor = cINTERCEPT;
+	cINTERCEPT.prototype.argumentsMin = 2;
+	cINTERCEPT.prototype.argumentsMax = 2;
 	cINTERCEPT.prototype.Calculate = function (arg) {
 
 		function intercept(y, x) {
@@ -2310,13 +2301,12 @@
 	function cKURT() {
 		this.name = "KURT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cKURT.prototype = Object.create(cBaseFunction.prototype);
 	cKURT.prototype.constructor = cKURT;
+	cKURT.prototype.argumentsMin = 1;
 	cKURT.prototype.Calculate = function (arg) {
 
 		function kurt(x) {
@@ -2402,13 +2392,13 @@
 	function cLARGE() {
 		this.name = "LARGE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cLARGE.prototype = Object.create(cBaseFunction.prototype);
 	cLARGE.prototype.constructor = cLARGE;
+	cLARGE.prototype.argumentsMin = 2;
+	cLARGE.prototype.argumentsMax = 2;
 	cLARGE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cLARGE.prototype._getValue = function (arg0, arg1) {
 		if (cElementType.error === arg1.type) {
@@ -2499,13 +2489,13 @@
 	function cLOGINV() {
 		this.name = "LOGINV";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cLOGINV.prototype = Object.create(cBaseFunction.prototype);
 	cLOGINV.prototype.constructor = cLOGINV;
+	cLOGINV.prototype.argumentsMin = 3;
+	cLOGINV.prototype.argumentsMax = 3;
 	cLOGINV.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -2565,13 +2555,13 @@
 	function cLOGNORMDIST() {
 		this.name = "LOGNORMDIST";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cLOGNORMDIST.prototype = Object.create(cBaseFunction.prototype);
 	cLOGNORMDIST.prototype.constructor = cLOGNORMDIST;
+	cLOGNORMDIST.prototype.argumentsMin = 3;
+	cLOGNORMDIST.prototype.argumentsMax = 3;
 	cLOGNORMDIST.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -2631,13 +2621,12 @@
 	function cMAX() {
 		this.name = "MAX";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMAX.prototype = Object.create(cBaseFunction.prototype);
 	cMAX.prototype.constructor = cMAX;
+	cMAX.prototype.argumentsMin = 1;
 	cMAX.prototype.Calculate = function (arg) {
 		var v, element, argIVal, max = Number.NEGATIVE_INFINITY;
 		for (var i = 0; i < this.argumentsCurrent; i++) {
@@ -2716,13 +2705,12 @@
 	function cMAXA() {
 		this.name = "MAXA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMAXA.prototype = Object.create(cBaseFunction.prototype);
 	cMAXA.prototype.constructor = cMAXA;
+	cMAXA.prototype.argumentsMin = 1;
 	cMAXA.prototype.Calculate = function (arg) {
 		var argI, argIVal, max = Number.NEGATIVE_INFINITY, v;
 		for (var i = 0; i < this.argumentsCurrent; i++) {
@@ -2803,13 +2791,12 @@
 	function cMEDIAN() {
 		this.name = "MEDIAN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMEDIAN.prototype = Object.create(cBaseFunction.prototype);
 	cMEDIAN.prototype.constructor = cMEDIAN;
+	cMEDIAN.prototype.argumentsMin = 1;
 	cMEDIAN.prototype.Calculate = function (arg) {
 
 		function median(x) {
@@ -2882,13 +2869,12 @@
 	function cMIN() {
 		this.name = "MIN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMIN.prototype = Object.create(cBaseFunction.prototype);
 	cMIN.prototype.constructor = cMIN;
+	cMIN.prototype.argumentsMin = 1;
 	cMIN.prototype.Calculate = function (arg) {
 		var v, element, argIVal, min = Number.POSITIVE_INFINITY;
 		for (var i = 0; i < this.argumentsCurrent; i++) {
@@ -2968,13 +2954,12 @@
 	function cMINA() {
 		this.name = "MINA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMINA.prototype = Object.create(cBaseFunction.prototype);
 	cMINA.prototype.constructor = cMINA;
+	cMINA.prototype.argumentsMin = 1;
 	cMINA.prototype.Calculate = function (arg) {
 		var argI, argIVal, min = Number.POSITIVE_INFINITY, v;
 		for (var i = 0; i < this.argumentsCurrent; i++) {
@@ -3056,13 +3041,12 @@
 	function cMODE() {
 		this.name = "MODE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cMODE.prototype = Object.create(cBaseFunction.prototype);
 	cMODE.prototype.constructor = cMODE;
+	cMODE.prototype.argumentsMin = 1;
 	cMODE.prototype.Calculate = function (arg) {
 
 		function mode(x) {
@@ -3155,13 +3139,13 @@
 	function cNEGBINOMDIST() {
 		this.name = "NEGBINOMDIST";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cNEGBINOMDIST.prototype = Object.create(cBaseFunction.prototype);
 	cNEGBINOMDIST.prototype.constructor = cNEGBINOMDIST;
+	cNEGBINOMDIST.prototype.argumentsMin = 3;
+	cNEGBINOMDIST.prototype.argumentsMax = 3;
 	cNEGBINOMDIST.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
 
@@ -3224,13 +3208,13 @@
 	function cNORMDIST() {
 		this.name = "NORMDIST";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cNORMDIST.prototype = Object.create(cBaseFunction.prototype);
 	cNORMDIST.prototype.constructor = cNORMDIST;
+	cNORMDIST.prototype.argumentsMin = 4;
+	cNORMDIST.prototype.argumentsMax = 4;
 	cNORMDIST.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], arg3 = arg[3];
@@ -3306,13 +3290,13 @@
 	function cNORMINV() {
 		this.name = "NORMINV";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cNORMINV.prototype = Object.create(cBaseFunction.prototype);
 	cNORMINV.prototype.constructor = cNORMINV;
+	cNORMINV.prototype.argumentsMin = 3;
+	cNORMINV.prototype.argumentsMax = 3;
 	cNORMINV.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -3372,13 +3356,13 @@
 	function cNORMSDIST() {
 		this.name = "NORMSDIST";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cNORMSDIST.prototype = Object.create(cBaseFunction.prototype);
 	cNORMSDIST.prototype.constructor = cNORMSDIST;
+	cNORMSDIST.prototype.argumentsMin = 1;
+	cNORMSDIST.prototype.argumentsMax = 1;
 	cNORMSDIST.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -3415,13 +3399,13 @@
 	function cNORMSINV() {
 		this.name = "NORMSINV";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cNORMSINV.prototype = Object.create(cBaseFunction.prototype);
 	cNORMSINV.prototype.constructor = cNORMSINV;
+	cNORMSINV.prototype.argumentsMin = 1;
+	cNORMSINV.prototype.argumentsMax = 1;
 	cNORMSINV.prototype.Calculate = function (arg) {
 
 		function normsinv(x) {
@@ -3467,13 +3451,13 @@
 	function cPEARSON() {
 		this.name = "PEARSON";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cPEARSON.prototype = Object.create(cBaseFunction.prototype);
 	cPEARSON.prototype.constructor = cPEARSON;
+	cPEARSON.prototype.argumentsMin = 2;
+	cPEARSON.prototype.argumentsMax = 2;
 	cPEARSON.prototype.Calculate = function (arg) {
 
 		function pearson(x, y) {
@@ -3554,13 +3538,13 @@
 	function cPERCENTILE() {
 		this.name = "PERCENTILE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cPERCENTILE.prototype = Object.create(cBaseFunction.prototype);
 	cPERCENTILE.prototype.constructor = cPERCENTILE;
+	cPERCENTILE.prototype.argumentsMin = 2;
+	cPERCENTILE.prototype.argumentsMax = 2;
 	cPERCENTILE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPERCENTILE.prototype.Calculate = function (arg) {
 
@@ -3621,13 +3605,13 @@
 	function cPERCENTRANK() {
 		this.name = "PERCENTRANK";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cPERCENTRANK.prototype = Object.create(cBaseFunction.prototype);
 	cPERCENTRANK.prototype.constructor = cPERCENTRANK;
+	cPERCENTRANK.prototype.argumentsMin = 2;
+	cPERCENTRANK.prototype.argumentsMax = 3;
 	cPERCENTRANK.prototype.Calculate = function (arg) {
 
 		function percentrank(A, x, k) {
@@ -3737,13 +3721,13 @@
 	function cPERMUT() {
 		this.name = "PERMUT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cPERMUT.prototype = Object.create(cBaseFunction.prototype);
 	cPERMUT.prototype.constructor = cPERMUT;
+	cPERMUT.prototype.argumentsMin = 2;
+	cPERMUT.prototype.argumentsMax = 2;
 	cPERMUT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -3828,13 +3812,13 @@
 	function cPOISSON() {
 		this.name = "POISSON";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cPOISSON.prototype = Object.create(cBaseFunction.prototype);
 	cPOISSON.prototype.constructor = cPOISSON;
+	cPOISSON.prototype.argumentsMin = 3;
+	cPOISSON.prototype.argumentsMax = 3;
 	cPOISSON.prototype.Calculate = function (arg) {
 
 		function poisson(x, l, cumulativeFlag) {
@@ -3907,13 +3891,13 @@
 	function cPROB() {
 		this.name = "PROB";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cPROB.prototype = Object.create(cBaseFunction.prototype);
 	cPROB.prototype.constructor = cPROB;
+	cPROB.prototype.argumentsMin = 3;
+	cPROB.prototype.argumentsMax = 4;
 	cPROB.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cPROB.prototype.Calculate = function (arg) {
 
@@ -4022,13 +4006,13 @@
 	function cQUARTILE() {
 		this.name = "QUARTILE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cQUARTILE.prototype = Object.create(cBaseFunction.prototype);
 	cQUARTILE.prototype.constructor = cQUARTILE;
+	cQUARTILE.prototype.argumentsMin = 2;
+	cQUARTILE.prototype.argumentsMax = 2;
 	cQUARTILE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cQUARTILE.prototype.Calculate = function (arg) {
 
@@ -4142,13 +4126,13 @@
 	function cRSQ() {
 		this.name = "RSQ";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cRSQ.prototype = Object.create(cBaseFunction.prototype);
 	cRSQ.prototype.constructor = cRSQ;
+	cRSQ.prototype.argumentsMin = 2;
+	cRSQ.prototype.argumentsMax = 2;
 	cRSQ.prototype.Calculate = function (arg) {
 
 		function rsq(x, y) {
@@ -4230,13 +4214,12 @@
 	function cSKEW() {
 		this.name = "SKEW";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSKEW.prototype = Object.create(cBaseFunction.prototype);
 	cSKEW.prototype.constructor = cSKEW;
+	cSKEW.prototype.argumentsMin = 1;
 	cSKEW.prototype.Calculate = function (arg) {
 
 		function skew(x) {
@@ -4324,13 +4307,13 @@
 	function cSLOPE() {
 		this.name = "SLOPE";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cSLOPE.prototype = Object.create(cBaseFunction.prototype);
 	cSLOPE.prototype.constructor = cSLOPE;
+	cSLOPE.prototype.argumentsMin = 2;
+	cSLOPE.prototype.argumentsMax = 2;
 	cSLOPE.prototype.Calculate = function (arg) {
 
 		function slope(y, x) {
@@ -4411,13 +4394,13 @@
 	function cSMALL() {
 		this.name = "SMALL";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cSMALL.prototype = Object.create(cBaseFunction.prototype);
 	cSMALL.prototype.constructor = cSMALL;
+	cSMALL.prototype.argumentsMin = 2;
+	cSMALL.prototype.argumentsMax = 2;
 	cSMALL.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cSMALL.prototype.Calculate = function (arg) {
 
@@ -4492,13 +4475,13 @@
 	function cSTANDARDIZE() {
 		this.name = "STANDARDIZE";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cSTANDARDIZE.prototype = Object.create(cBaseFunction.prototype);
 	cSTANDARDIZE.prototype.constructor = cSTANDARDIZE;
+	cSTANDARDIZE.prototype.argumentsMin = 3;
+	cSTANDARDIZE.prototype.argumentsMax = 3;
 	cSTANDARDIZE.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
@@ -4558,13 +4541,12 @@
 	function cSTDEV() {
 		this.name = "STDEV";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSTDEV.prototype = Object.create(cBaseFunction.prototype);
 	cSTDEV.prototype.constructor = cSTDEV;
+	cSTDEV.prototype.argumentsMin = 1;
 	cSTDEV.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cSTDEV.prototype.Calculate = function (arg) {
 		var i, element, count = 0, sum = new cNumber(0), member = [];
@@ -4627,13 +4609,12 @@
 	function cSTDEVA() {
 		this.name = "STDEVA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSTDEVA.prototype = Object.create(cBaseFunction.prototype);
 	cSTDEVA.prototype.constructor = cSTDEVA;
+	cSTDEVA.prototype.argumentsMin = 1;
 	cSTDEVA.prototype.Calculate = function (arg) {
 		var count = 0, sum = new cNumber(0), member = [], i;
 		for (i = 0; i < arg.length; i++) {
@@ -4693,13 +4674,12 @@
 	function cSTDEVP() {
 		this.name = "STDEVP";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSTDEVP.prototype = Object.create(cBaseFunction.prototype);
 	cSTDEVP.prototype.constructor = cSTDEVP;
+	cSTDEVP.prototype.argumentsMin = 1;
 	cSTDEVP.prototype.Calculate = function (arg) {
 		function _var(x) {
 			var i, tA = [], sumSQRDeltaX = 0, _x = 0, xLength = 0;
@@ -4772,13 +4752,12 @@
 	function cSTDEVPA() {
 		this.name = "STDEVPA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cSTDEVPA.prototype = Object.create(cBaseFunction.prototype);
 	cSTDEVPA.prototype.constructor = cSTDEVPA;
+	cSTDEVPA.prototype.argumentsMin = 1;
 	cSTDEVPA.prototype.Calculate = function (arg) {
 
 		function _var(x) {
@@ -4865,13 +4844,13 @@
 	function cSTEYX() {
 		this.name = "STEYX";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cSTEYX.prototype = Object.create(cBaseFunction.prototype);
 	cSTEYX.prototype.constructor = cSTEYX;
+	cSTEYX.prototype.argumentsMin = 2;
+	cSTEYX.prototype.argumentsMax = 2;
 	cSTEYX.prototype.Calculate = function (arg) {
 
 		function steyx(y, x) {
@@ -5010,13 +4989,12 @@
 	function cVAR() {
 		this.name = "VAR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cVAR.prototype = Object.create(cBaseFunction.prototype);
 	cVAR.prototype.constructor = cVAR;
+	cVAR.prototype.argumentsMin = 1;
 	cVAR.prototype.Calculate = function (arg) {
 		function _var(x) {
 			if (x.length < 1) {
@@ -5095,13 +5073,12 @@
 	function cVARA() {
 		this.name = "VARA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cVARA.prototype = Object.create(cBaseFunction.prototype);
 	cVARA.prototype.constructor = cVARA;
+	cVARA.prototype.argumentsMin = 1;
 	cVARA.prototype.Calculate = function (arg) {
 
 		function _var(x) {
@@ -5192,13 +5169,12 @@
 	function cVARP() {
 		this.name = "VARP";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cVARP.prototype = Object.create(cBaseFunction.prototype);
 	cVARP.prototype.constructor = cVARP;
+	cVARP.prototype.argumentsMin = 1;
 	cVARP.prototype.Calculate = function (arg) {
 		function _var(x) {
 			if (x.length < 1) {
@@ -5276,13 +5252,12 @@
 	function cVARdotP() {
 		this.name = "VAR.P";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cVARdotP.prototype = Object.create(cBaseFunction.prototype);
 	cVARdotP.prototype.constructor = cVARdotP;
+	cVARdotP.prototype.argumentsMin = 1;
 	cVARdotP.prototype.Calculate = cVARP.prototype.Calculate;
 	cVARdotP.prototype.getInfo = function () {
 		return {
@@ -5297,13 +5272,12 @@
 	function cVARPA() {
 		this.name = "VARPA";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cVARPA.prototype = Object.create(cBaseFunction.prototype);
 	cVARPA.prototype.constructor = cVARPA;
+	cVARPA.prototype.argumentsMin = 1;
 	cVARPA.prototype.Calculate = function (arg) {
 
 		function _var(x) {
diff --git a/cell/model/FormulaObjects/textanddataFunctions.js b/cell/model/FormulaObjects/textanddataFunctions.js
index 9546292e8..e1c61f241 100644
--- a/cell/model/FormulaObjects/textanddataFunctions.js
+++ b/cell/model/FormulaObjects/textanddataFunctions.js
@@ -89,13 +89,13 @@
 	function cCHAR() {
 		this.name = "CHAR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCHAR.prototype = Object.create(cBaseFunction.prototype);
 	cCHAR.prototype.constructor = cCHAR;
+	cCHAR.prototype.argumentsMin = 1;
+	cCHAR.prototype.argumentsMax = 1;
 	cCHAR.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -139,13 +139,13 @@
 	function cCLEAN() {
 		this.name = "CLEAN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCLEAN.prototype = Object.create(cBaseFunction.prototype);
 	cCLEAN.prototype.constructor = cCLEAN;
+	cCLEAN.prototype.argumentsMin = 1;
+	cCLEAN.prototype.argumentsMax = 1;
 	cCLEAN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -181,13 +181,13 @@
 	function cCODE() {
 		this.name = "CODE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cCODE.prototype = Object.create(cBaseFunction.prototype);
 	cCODE.prototype.constructor = cCODE;
+	cCODE.prototype.argumentsMin = 1;
+	cCODE.prototype.argumentsMax = 1;
 	cCODE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -231,13 +231,12 @@
 	function cCONCATENATE() {
 		this.name = "CONCATENATE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 255;
 	}
 
 	cCONCATENATE.prototype = Object.create(cBaseFunction.prototype);
 	cCONCATENATE.prototype.constructor = cCONCATENATE;
+	cCONCATENATE.prototype.argumentsMin = 1;
 	cCONCATENATE.prototype.Calculate = function (arg) {
 		var arg0 = new cString(""), argI;
 		for (var i = 0; i < this.argumentsCurrent; i++) {
@@ -280,13 +279,13 @@
 	function cDOLLAR() {
 		this.name = "DOLLAR";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cDOLLAR.prototype = Object.create(cBaseFunction.prototype);
 	cDOLLAR.prototype.constructor = cDOLLAR;
+	cDOLLAR.prototype.argumentsMin = 1;
+	cDOLLAR.prototype.argumentsMax = 2;
 	cDOLLAR.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cDOLLAR.prototype.Calculate = function (arg) {
 
@@ -484,13 +483,13 @@
 	function cEXACT() {
 		this.name = "EXACT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cEXACT.prototype = Object.create(cBaseFunction.prototype);
 	cEXACT.prototype.constructor = cEXACT;
+	cEXACT.prototype.argumentsMin = 2;
+	cEXACT.prototype.argumentsMax = 2;
 	cEXACT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -535,13 +534,13 @@
 	function cFIND() {
 		this.name = "FIND";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cFIND.prototype = Object.create(cBaseFunction.prototype);
 	cFIND.prototype.constructor = cFIND;
+	cFIND.prototype.argumentsMin = 2;
+	cFIND.prototype.argumentsMax = 3;
 	cFIND.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = this.getArguments() == 3 ? arg[2] :
 			null, res, str, searchStr, pos = -1;
@@ -638,13 +637,13 @@
 	function cFIXED() {
 		this.name = "FIXED";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cFIXED.prototype = Object.create(cBaseFunction.prototype);
 	cFIXED.prototype.constructor = cFIXED;
+	cFIXED.prototype.argumentsMin = 1;
+	cFIXED.prototype.argumentsMax = 3;
 	cFIXED.prototype.Calculate = function (arg) {
 
 		function SignZeroPositive(number) {
@@ -850,13 +849,13 @@
 	function cLEFT() {
 		this.name = "LEFT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cLEFT.prototype = Object.create(cBaseFunction.prototype);
 	cLEFT.prototype.constructor = cLEFT;
+	cLEFT.prototype.argumentsMin = 1;
+	cLEFT.prototype.argumentsMax = 2;
 	cLEFT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = this.argumentsCurrent == 1 ? new cNumber(1) : arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -917,13 +916,13 @@
 	function cLEN() {
 		this.name = "LEN";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cLEN.prototype = Object.create(cBaseFunction.prototype);
 	cLEN.prototype.constructor = cLEN;
+	cLEN.prototype.argumentsMin = 1;
+	cLEN.prototype.argumentsMax = 1;
 	cLEN.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -968,13 +967,13 @@
 	function cLOWER() {
 		this.name = "LOWER";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cLOWER.prototype = Object.create(cBaseFunction.prototype);
 	cLOWER.prototype.constructor = cLOWER;
+	cLOWER.prototype.argumentsMin = 1;
+	cLOWER.prototype.argumentsMax = 1;
 	cLOWER.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -1006,13 +1005,13 @@
 	function cMID() {
 		this.name = "MID";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cMID.prototype = Object.create(cBaseFunction.prototype);
 	cMID.prototype.constructor = cMID;
+	cMID.prototype.argumentsMin = 3;
+	cMID.prototype.argumentsMax = 3;
 	cMID.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1104,13 +1103,13 @@
 	function cPROPER() {
 		this.name = "PROPER";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cPROPER.prototype = Object.create(cBaseFunction.prototype);
 	cPROPER.prototype.constructor = cPROPER;
+	cPROPER.prototype.argumentsMin = 1;
+	cPROPER.prototype.argumentsMax = 1;
 	cPROPER.prototype.Calculate = function (arg) {
 		var reg_PROPER = new RegExp("[-#$+*/^&%<\\[\\]='?_\\@!~`\">: ;.\\)\\(,]|\\d|\\s"), arg0 = arg[0];
 
@@ -1175,13 +1174,13 @@
 	function cREPLACE() {
 		this.name = "REPLACE";
 		this.value = null;
-		this.argumentsMin = 4;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cREPLACE.prototype = Object.create(cBaseFunction.prototype);
 	cREPLACE.prototype.constructor = cREPLACE;
+	cREPLACE.prototype.argumentsMin = 4;
+	cREPLACE.prototype.argumentsMax = 4;
 	cREPLACE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], arg3 = arg[3];
 
@@ -1270,13 +1269,13 @@
 	function cREPT() {
 		this.name = "REPT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cREPT.prototype = Object.create(cBaseFunction.prototype);
 	cREPT.prototype.constructor = cREPT;
+	cREPT.prototype.argumentsMin = 2;
+	cREPT.prototype.argumentsMax = 2;
 	cREPT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], res = "";
 		if (arg0 instanceof cError) {
@@ -1337,13 +1336,13 @@
 	function cRIGHT() {
 		this.name = "RIGHT";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cRIGHT.prototype = Object.create(cBaseFunction.prototype);
 	cRIGHT.prototype.constructor = cRIGHT;
+	cRIGHT.prototype.argumentsMin = 1;
+	cRIGHT.prototype.argumentsMax = 2;
 	cRIGHT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = this.argumentsCurrent == 1 ? new cNumber(1) : arg[1];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1404,13 +1403,13 @@
 	function cSEARCH() {
 		this.name = "SEARCH";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 3;
 	}
 
 	cSEARCH.prototype = Object.create(cBaseFunction.prototype);
 	cSEARCH.prototype.constructor = cSEARCH;
+	cSEARCH.prototype.argumentsMin = 2;
+	cSEARCH.prototype.argumentsMax = 3;
 	cSEARCH.prototype.Calculate = function (arg) {
 
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2] ? arg[2] : new cNumber(1);
@@ -1511,13 +1510,13 @@
 	function cSUBSTITUTE() {
 		this.name = "SUBSTITUTE";
 		this.value = null;
-		this.argumentsMin = 3;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 4;
 	}
 
 	cSUBSTITUTE.prototype = Object.create(cBaseFunction.prototype);
 	cSUBSTITUTE.prototype.constructor = cSUBSTITUTE;
+	cSUBSTITUTE.prototype.argumentsMin = 3;
+	cSUBSTITUTE.prototype.argumentsMax = 4;
 	cSUBSTITUTE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1], arg2 = arg[2], arg3 = arg[3] ? arg[3] : new cNumber(0);
 
@@ -1597,13 +1596,13 @@
 	function cT() {
 		this.name = "T";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cT.prototype = Object.create(cBaseFunction.prototype);
 	cT.prototype.constructor = cT;
+	cT.prototype.argumentsMin = 1;
+	cT.prototype.argumentsMax = 1;
 	cT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
@@ -1635,13 +1634,13 @@
 	function cTEXT() {
 		this.name = "TEXT";
 		this.value = null;
-		this.argumentsMin = 2;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 2;
 	}
 
 	cTEXT.prototype = Object.create(cBaseFunction.prototype);
 	cTEXT.prototype.constructor = cTEXT;
+	cTEXT.prototype.argumentsMin = 2;
+	cTEXT.prototype.argumentsMax = 2;
 	cTEXT.prototype.Calculate = function (arg) {
 		var arg0 = arg[0], arg1 = arg[1];
 		if (arg0 instanceof cRef || arg0 instanceof cRef3D) {
@@ -1711,13 +1710,13 @@
 	function cTRIM() {
 		this.name = "TRIM";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cTRIM.prototype = Object.create(cBaseFunction.prototype);
 	cTRIM.prototype.constructor = cTRIM;
+	cTRIM.prototype.argumentsMin = 1;
+	cTRIM.prototype.argumentsMax = 1;
 	cTRIM.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 
@@ -1752,13 +1751,13 @@
 	function cUPPER() {
 		this.name = "UPPER";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cUPPER.prototype = Object.create(cBaseFunction.prototype);
 	cUPPER.prototype.constructor = cUPPER;
+	cUPPER.prototype.argumentsMin = 1;
+	cUPPER.prototype.argumentsMax = 1;
 	cUPPER.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
 		if (arg0 instanceof cArea || arg0 instanceof cArea3D) {
@@ -1788,13 +1787,13 @@
 	function cVALUE() {
 		this.name = "VALUE";
 		this.value = null;
-		this.argumentsMin = 1;
 		this.argumentsCurrent = 0;
-		this.argumentsMax = 1;
 	}
 
 	cVALUE.prototype = Object.create(cBaseFunction.prototype);
 	cVALUE.prototype.constructor = cVALUE;
+	cVALUE.prototype.argumentsMin = 1;
+	cVALUE.prototype.argumentsMax = 1;
 	cVALUE.prototype.numFormat = AscCommonExcel.cNumFormatNone;
 	cVALUE.prototype.Calculate = function (arg) {
 		var arg0 = arg[0];
-- 
2.30.9