SOLVED

Calculated column from 7 Yes/No

Copper Contributor

Hi everybody,

 

I recently tried to use the calculated columns from SharePoint (first time trying) and I can't pull off what I need. Basically, I have 7 Yes/No controls and I simply want to create a column that return a string like "Ok" if all seven are "Yes" and "Not Ok" if not. I can make it work with one but I tried every IF/AND coding that I knew and I always displays the same thing : every column displays "Not Ok"

 

Can someone enlighten me please :D ?

 

5 Replies
Should just be a bunch of IF's. Like so.

=IF([Column1]=Yes,IF([Column2]=Yes,IF([Column3]=Yes,IF([Column4]=Yes,IF([Column5]=Yes,IF([Column6]=Yes,IF([Column7]=Yes, "OK")))))), "Not OK")

@Chris WebbI tried it, does not seem to work. It's too bad SP does not show you where it comes from like in PowerApps^^

@Devildez_1994 

I assume you've tried building this out one field at a time rather than all 7 at once, right? Do one, make sure that works. Add another. Make sure that works, etc.

 

Also, note that in SharePoint, while the Yes/No column reads text, the values stored are actually numbers. So when you do the calc, make sure you use numbers. I think Yes =1 and No = 0. 

best response confirmed by Devildez_1994 (Copper Contributor)
Solution

@Devildez_1994  Use the + operator to add up each column, and if the total is 7 then set your text. Here is a post I made last week where someone had the same issue:

https://techcommunity.microsoft.com/t5/SharePoint/Need-help-with-nested-IF-AND-statement-for-a-Calcu...

 

Excellent idea! I never thought of using simple addition. I like it!
1 best response

Accepted Solutions
best response confirmed by Devildez_1994 (Copper Contributor)
Solution

@Devildez_1994  Use the + operator to add up each column, and if the total is 7 then set your text. Here is a post I made last week where someone had the same issue:

https://techcommunity.microsoft.com/t5/SharePoint/Need-help-with-nested-IF-AND-statement-for-a-Calcu...

 

View solution in original post