Solved

SharePoint 2010 Conditional Statements in Calculated Column

Posted on 2012-03-21
5
1,690 Views
Last Modified: 2012-08-14
I have a SharePoint list that has a column called "Rev Due" which is a set due date. I have a calculated column in this list called "Overdue". In the formula for this column I have this code:

=IF(Today>[Rev Due],"Yes","No")

Open in new window


It works great. It displays "Yes" if the date is overdue. I need to add one more condition. I have another column called "Status". I need it to only display "Yes" if the Status is also "Not Started".  I cannot figure out how to make SharePoint accept the second condition.

I tried to modify this example found online as a base but I can't get it to work:

=IF(AND([Column1]>[Column2], [Column1]<[Column3]), "OK", "Not OK")

Open in new window


End result needed: The word "yes" only displays if the date is overdue and the status is "not started".

Thanks!
0
Comment
Question by:jj1103
  • 3
  • 2
5 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 37746621
How about:

=IF(Today<=[Rev Due],No, IF([Status] ="Not Started","Yes","No"))
0
 

Author Comment

by:jj1103
ID: 37746729
This produces an error in syntax.
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 37746741
I left off a couple of quotes.  Try:

=IF(Today<=[Rev Due],"No", IF([Status] ="Not Started","Yes","No"))

I'm an Access guy, so we use the IIF( ) function.  The IF( ) syntax looks more like Excel.  Sure wish Microsoft would standardize these functions across applications.
0
 

Author Comment

by:jj1103
ID: 37746748
This code makes everything display "No"....what should I change?

=IF(AND(Today>[Rev Due],[Status]="Not Started"),"Yes","No")

Open in new window

0
 

Author Comment

by:jj1103
ID: 37746766
Fixed it!  I had to delete the "Today" column I made to trick SharePoint into using the "Today" code.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question