Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1772
  • Last Modified:

SharePoint 2010 Conditional Statements in Calculated Column

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
jj1103
Asked:
jj1103
  • 3
  • 2
1 Solution
 
Dale FyeCommented:
How about:

=IF(Today<=[Rev Due],No, IF([Status] ="Not Started","Yes","No"))
0
 
jj1103Author Commented:
This produces an error in syntax.
0
 
Dale FyeCommented:
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
 
jj1103Author Commented:
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
 
jj1103Author Commented:
Fixed it!  I had to delete the "Today" column I made to trick SharePoint into using the "Today" code.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now