We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception occurs while setting formula containg SUM and COUNTIF functions

We have a requirement where we have to show values in some cells based upon a formula. The formula that has to be set contains functions SUM and COUNTIF.
But while setting formula with these functions we are getting following exceptions :

java.lang.IllegalArgumentException: You have entered too few parameters for function COUNTIF


sum(=COUNTIF($‘sheet name’.$F$9:$ZA$9;3))
java.lang.IllegalArgumentException: Unsupported formula : =SUM(COUNTIF($‘sheet name’.$F$9:$ZA$9;3)).

In case of SUM it is appending ‘.’ in the end of formula string.

Please let me know where is the problem?


Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please use comma instead of semi colin as a parameter separator in your formula. Please modify your formula as below:



Thank You & Best Regards,

Thanks for your quick response.

We are now using comma instead of semi colon still it is throwing the below mentioned exception :
=COUNTIF($‘sheet name’.$F$9:$ZA$9,3)
java.lang.IllegalArgumentException: Unsupported formula : =COUNTIF($‘sheet


The same exception also occurs when we are using SUM function in the formula.


Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please update your formula as mentioned below, if you still face any problem, please share your code and template file to show the issue. We will check it soon.

=COUNTIF('sheet name'!$F$9:$ZA$9,3)

=SUM(COUNTIF('sheet name'!$F$9:$ZA$9,3))

Thank You & Best Regards,