views:

123

answers:

1

CountIF function in excel , How do I use the same function in sharepoint Calculated Field. I want count number of "GO" from Column 1 to Column 12 i.e. Col 1 "GO", Col 2 "GO", Col 3 "No GO", Col 4 "GO": GOs=3

+1  A: 

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) + ...

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.

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

Ryan