Forum Discussion
COUNTA syntax error
- Jun 09, 2023
SMiller89 Yes, you can only add up to 30 arguments to single count function. However, you can use multiple COUNT function based on number of columns you are using.
For example:
=COUNT([T1],[T2],[T3],[T4],[T5) + COUNT([T6],[T7],[T8],[T9],[T10)You can add up to 30 columns in each of the count function (I have just used 5 columns each to show you how to use multiple count functions).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
RobElliott COUNT and COUNTA functions are available in SharePoint calculated formula as well.
SMiller89 But, those might not work for your requirements. Check below uses of these functions and see if those will work for your requirements or not.
- COUNT function : Counts the number of arguments that contain numbers.
- COUNTA function : Counts the number of arguments that are not empty.
Example:
N1, N2 & N3 columns are of type Number and T1, T2 & T3 columns are of type Text. CountN and CountT are calculated columns (formula used given in above image).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap My answer columns are all set as text and the score columns are all set as numbers.
(but I've tried switching between COUNT and COUNTA just to troubleshoot)
I just tried COUNT with only S1-S10 and that worked, so I kept adding more columns until I got the syntax error again at S31. Is there just a limit on how many columns I can reference?
- ganeshsanapJun 09, 2023MVP
SMiller89 Yes, you can only add up to 30 arguments to single count function. However, you can use multiple COUNT function based on number of columns you are using.
For example:
=COUNT([T1],[T2],[T3],[T4],[T5) + COUNT([T6],[T7],[T8],[T9],[T10)You can add up to 30 columns in each of the count function (I have just used 5 columns each to show you how to use multiple count functions).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.