Error with calculated column having more than 30 conditions.
Hi , I am using calculated column with below conditions. =IF(OR(CC="Jordan",CC="Kuwait"),"Yes") It would return: Yes if CC column contains either Jordan or Kuwait. Else it would return No . It is working fine if I am using conditions of 3,4,5,6....30. But if i am using more than 30 conditions it's showing me error: The formula contains a syntax error or is not supported. Please let me know if i am doing wrong anywhere or is it the limitation of SharePoint. Deeptyranjan
October 21st, 2010 1:49pm

Seven nested "if's" are the limit, however there is a workaround described here that will allow you 15 by concatenating two calculated columns. -Brian
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 11:02pm

Hi Brian, Thanks for your response. But As I have mentioned my issue is little bit different. In My case the answer is same for all conditions. So i have used only one If condition and multiple OR operators. And in this way i am successful unto 30 OR operators. But beyond 30, it's throwing error. =IF(OR(CC="United Arab Emirates",CC="Qatar",CC="Oman",CC="United Kingdom",CC="Ireland",CC="Japan",CC="South Korea",CC="Denmark",CC="Norway",CC="Sweden",CC="Czech Republic",CC="Poland",CC="Slovakia",CC="Hungary",CC="Germany",CC="Austria",CC="Belgium",CC="Netherlands",CC="Switzerland",CC="Honduras",CC="Guatemala",CC="El Salvador",CC="Nicaragua",CC="Chile",CC="Peru",CC="Ecuador",CC="Bolivia",CC="Brazil",CC="Argentina",CC="Uruguay",CC="Canada"),"Yes") And I am sure the problem would be resolved if I would take another calculated column for rest of the conditions. But it would be confusing for users / designers. Deeptyranjan
October 22nd, 2010 9:14am

Hi Deeptyranjan, according to brians Post you should try something like this: =IF(OR(CC="United Arab Emirates",CC="Qatar",CC="Oman",CC="United Kingdom",CC="Ireland",CC="Japan",CC="South Korea",CC="Denmark",CC="Norway",CC="Sweden",CC="Czech Republic",CC="Poland",CC="Slovakia",CC="Hungary",CC="Germany",CC="Austria",CC="Belgium",CC="Netherlands",CC="Switzerland",CC="Honduras",CC="Guatemala",CC="El Salvador",CC="Nicaragua",CC="Chile"),"Yes",IF(OR(CC="Peru",CC="Ecuador",CC="Bolivia",CC="Brazil",CC="Argentina",CC="Uruguay",CC="Canada"),"Yes")) In my environment it works only if I use the semicolon (;) istead of the comma (,).
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2010 3:44pm

Hi, I can reproduce your issue, same behavior for “AND” operation. It seems it’s another limitation for calculated column you found: For single logic operation, the total of the conditions can’t be more than 30. How to resolve this issue, you can consider Dummy’s suggestion. Additionally there is another two limitations in the below links http://sharepointkb.wordpress.com/2009/02/10/calculated-column-limits-1024-characters http://blog.pathtosharepoint.com/2010/04/12/maximum-number-of-if-statements-in-a-calculated-column/ (from Brian’s post) Hope this helps Thanks! StanffordEverything will be fine.
October 25th, 2010 10:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics