Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Banged my head against this one for too long so thought I'd give in and post it. I'm trying to create a calculated column that evaluates two different conditions, as in:

IF

[Boolean A] = No

OR

[Boolean A] = Yes AND [Text B] is not null AND [Text C] is not null

THEN

return "READY"

ELSE

return "NOT READY"

Possible? Thanks in advance!

share|improve this question
    
Why test Boolean A is no or yes? Did you mean to have another Boolean in there? Or is it that Boolean A may be null? –  spevilgenius Sep 12 '12 at 17:54
    
These are coming from an InfoPath form and the logic is this: if the boolean (Special Approval Required) is NO then I want to set a Ready for Approval column to READY, but if the boolean is YES then I have to wait for two signatures on the InfoPath form. Make sense? It's perfectly likely that there's other logic that will get this done, just haven't found a more obvious solution yet. –  SharePointEric Sep 12 '12 at 17:58

1 Answer 1

up vote 2 down vote accepted

Give this a try. Just based on your input as I don't have this mapped out anywhere to test:

=IF(OR([Boolean A]='No', [Boolean A]='Yes'), IF(AND(LEN[Text B] > 0, LEN[Text C] > 0), "READY", "NOT READY"))

Maybe this is better!

=IF(OR([Boolean A]='No', AND([Boolean A]='Yes', AND(LEN[Text B] > 0, LEN[Text C] > 0)), "READY", "NOT READY"))

share|improve this answer
    
Your comment got cutoff when I viewed the last time so this is slightly off! –  spevilgenius Sep 12 '12 at 18:20
    
Testing now, looks close but throwing syntax errors. Usually just a misplaced parenthesis but so far I don't see it. The formula with my real column names included and the boolean conditions changed to = FALSE and = TRUE (that's the only foolproof boolean expression I've found) appears below. =IF(OR([Req_VM]=FALSE, AND([Req_VM]=TRUE, AND(LEN[Storage_Sign] > 0, LEN[VMWare_Sign] > 0)), "READY", "NOT READY")) –  SharePointEric Sep 12 '12 at 19:23
    
By the way, a Thank You should have been in there somewhere, so... Thank You! –  SharePointEric Sep 12 '12 at 19:24
    
Well spevilgenius lives up to his name, though possibly minus the "evil". Many thanks! This answer got me almost all the way there and I finished it by deconstructing the formula, first testing the AND and LEN arguments and working outward from there. The final result should you want to know is: =IF(OR([Boolean A]=FALSE,AND([Boolean A]=TRUE,LEN([Text B])>0,LEN([Text C])>0)),"READY","NOT READY") –  SharePointEric Sep 12 '12 at 19:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.