问题描述
excel中的CountIF函数,如何在excel中使用相同的函数sharepoint 计算字段.我想从第 1 列到第 12 列计算GO"的数量即 Col 1 "GO", Col 2 "GO", Col 3 "No GO", Col 4 "GO": GOs=3
CountIF function in excel , How do I use the same function insharepoint Calculated Field. I want count number of "GO" from Column 1 to Column 12i.e. Col 1 "GO", Col 2 "GO", Col 3 "No GO", Col 4 "GO": GOs=3
推荐答案
SharePoint 中没有 CountIF
There is no CountIF in SharePoint
因此,您将不得不使用设置为数字的计算列和类似的公式
So instead you're going to have to use a Calculated Column set to Number and a formula like
=IF([Column1]="GO",1,0) + IF([Column2]="GO",1,0) + ...
对于 12 列,您将遇到 您可以拥有多少嵌套 If 的限制 - 这篇文章将为您提供一些选择.
For 12 columns you're going to run in to a limit of how many nested If's you can have - this post will give you some options.
另一种方法是使用工作流或事件接收器,甚至在 NewForm.aspx 和 EditForm.aspx 上使用时髦的 javascript hack 来计算代码中的Gos 数"列
The alternative is to calculate the "Number of Gos" column in code using either Workflow or an Event Receiver or even a funky javascript hack on the NewForm.aspx and EditForm.aspx
这篇关于如何在 SharePoint 中构建 CountIF 函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!