Solved

SharePoint 2010 Conditional Statements in Calculated Column

Posted on 2012-03-21
5
1,664 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short film showing how OnPage and Connectwise integration works.

930 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now