Taming the Elusive “Calculated Column” – Logic – Part 6
Formulas for Testing Multiple Conditions
Overview
In the last series of articles discussing logical functions, we looked at nesting multiple “IF” statements together to test for each possible outcome in order to arrive at our final solution.
To model this approach, we looked at using common logic modeling tools like “Truth Tables” and “Hierarchical Flowcharts” to first build out the path the logic will take, then transform that logic into a complete formula we can simply paste into a SharePoint calculated column.
In this series, we’ll look at bringing in the additional logical functions of “OR” and “AND” in order to test for combinations of logical tests all within the same check.
Getting Started
To begin, we first need to understand the logic associated with both new functions, so we’ll revisit our “Truth Table” in order to illustrate how each of these works.

The basics behind the “OR” function is that if any of the values are “TRUE”, the entire statement is “TRUE”, and if none of them are “TRUE”, the entire statement is “FALSE”.
We can use the “OR” function to test for up to 30 different values together and as long as at least one of them results in true, the end result will also be “TRUE”.
Next Steps: Adding in the Questions
“People might not get all they work for in this world, but they must certainly work for all they get”. – Frederick Douglass
At a traditional business, in order for someone to receive a paycheck, there’s a minimum criteria that must be met…they should be in the system (meaning they’re an employee on record), and should have worked a number of hours. Of course, there’s also the possibility that they took vacation days or sick leave as well, so we’ll look at these three types of “Hours” in order to see if they should be issued a paycheck.
Our conditions (questions) will be:
“Regular Hours”
“Vacation”
“Sick Leave”
Adding these into our “Truth Table”, it becomes:

Looking at the logic of each row in the table:
Row 1: Employee worked “Regular Hours”, took “Vacation”, and submitted “Sick Leave”. Since at least one of the three was true, the final “Result” is “TRUE”, so the employee will be issued a paycheck.
Row 2: Employee worked “Regular Hours”, took “Vacation”, but did not submit “Sick Leave”. Again, since at least one of the three was true, the final “Result” is “TRUE”, so the employee will be issued a paycheck.
Rows 3-7: At least one of the three was true, so the final “Result” is “TRUE” which will allow for a paycheck to be issued to the employee.
Row 8: In all previous rows, at least one condition was true, the final result was “TRUE”, but in the last row none of the conditions have been met. Since none of them result in true, the final “Result” is “FALSE”, so the employee will not be issued a paycheck.
Next time, we’ll look at the “AND” function and how it differs from the “OR”.
- Dessie
Dessie Lunsford
Points-of-Sharing
- Taming the Elusive "Calculated Column"
- EndUserSharePoint.com: Taming the Elusive "Calculated Column" - Customizing a Task List
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Task List (Part II)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Task List (Part III)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Task List (Part IV)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Text and Data
- EndUserSharePoint.com: Taming the Elusive "Calculated Column" - Customizing a Contacts List (Part I)
- EndUserSharePoint.com: Taming the Elusive "Calculated Column" - Customizing a Contacts List (Part II-I)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Contacts List (Part II-II)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” - Customizing a Contacts List (Part II-III)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part III)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part IV)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part V)
- EndUserSharePoint.com: Taming the Elusive “Calculated Column” – Text and Data (Part VI)
- Taming the Elusive “Calculated Column” – Lookup and Reference
- Taming the Elusive “Calculated Column” - Logic
- Taming the Elusive “Calculated Column” - Logic - Part 1
- Taming the Elusive “Calculated Column” - Logic - Part 2
- Taming the Elusive “Calculated Column” - Logic - Part 3
- Taming the Elusive “Calculated Column” - Logic - Part 4
- Taming the Elusive “Calculated Column” - Logic - Part 5
- Taming the Elusive “Calculated Column” - Logic - Part 7
- Taming the Elusive “Calculated Column” - Logic - Part 6
- Taming the Elusive “Calculated Column” - Logic - Part 8
- Taming the Elusive “Calculated Column” - Logic - Part 9
- Taming the Elusive “Calculated Column” - Logic - Part 10
- Taming the Elusive “Calculated Column” - Date and Time - Part 1
- Taming the Elusive “Calculated Column” - Date and Time - Part 2
- Taming the Elusive “Calculated Column” - Date and Time - Part 3
- Taming the Elusive “Calculated Column” - Date and Time - Part 4
- Taming the Elusive “Calculated Column” - Referencing Multiple Lines of Text Column
- Taming the Elusive “Calculated Column” – Date and Time – Part 5
- Taming the Elusive “Calculated Column” – Date and Time – Part 6
- Taming the Elusive “Calculated Column” – Date and Time – Part 7
- Taming the Elusive "Calculated Column" - Referencing a Multiple Lines of Text Column With Append Text: Part 1
- Taming the Elusive "Calculated Column" - Referencing a Multiple Lines of Text Column With Append Text: Part 2
- Taming the Elusive "Calculated Column" - Referencing a Multiple Lines of Text Column With Append Text: Part 3
Hi Dessie:
Another great, well explained article! Thanks-
I guess this is exactly what I need to use, but I need advice. I need to test if 6 date fields are in the future (current) or in the past (expired). My purpose for using your testing is to eventually create an html color scheme with a percentage that indicates what percent of the 6 date fields are “current”. Sounds like a little Dessie mixed with some Christophe, yes?
Thanks
Charlie Epes
Buffalo, NY
[email protected]
Charlie,
Sounds kinda like you already have an idea of what to do :)
Through JavaScript (jQuery would be better probably), you can compare dates listed (your 6 date fields) to the current date, then use that in addition to Christophe’s render-html script to work with your colors.
If you post this as a question on the STP forums, I’ll bet Paul will jump in and help out.
- Dessie