Solved

SharePoint 2010 Conditional Statements in Calculated Column

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

23 Experts available now in Live!

Get 1:1 Help Now