Forum Discussion
IF FORMULA - Help Needed please
a pending date column
and a pending approval date column
if ALL three are blank i'd like the formula to produce 'Not Completed'
If there is only a Completed date but its expired the formula should show expired
if there is either a pending or pending approval date in the future it should say pending
if either of these dates are in the past it should say expired
Your answer doesn't seem to cover all the possibilities. You have to realize, that you, since you're IN the situation, consider the answer to the following question is obvious and therefore not worth stating.
This is a question I would be asking if we were sitting down face to face, and I apologize if it seems so obvious to you:
Is it ever the case that two or more of the cells L4, P4 and V4 will have values in them?
I understand what happens if any one of them has a value, but to me it's not clear whether two or more might have a value and what happens then if those values are inconsistent.
And since that still needs answering, let me pose another, which gets at the basic design.
In your most recent post you referred to those cells by labels (perhaps a column heading) and those labels themselves are
- Completed
- Pending
- Pending Approval
meaning that whoever is entering the data needs to pick a column that corresponds to the state of pending or completion--in other words., that entry already presumes the answer to the question this IF function is proposing to answer--so WHY do you even need a formula that answers the question??!!
That is a serious question.That's a big part of why I asked before if it is possible for you to post a copy of the spreadsheet itself. Especially since two of the cells apparently are going to contain dates that reflect--or appear to reflect--almost identical data: "Pending" and "Pending Approval" It just sounds like a confusing design, and part of what NikolinoDE and I (and others on this site) offer is help in making sure spreadsheet designs make sense, not just that formulas work.
- SGeorgieNov 14, 2023Brass Contributorso yes they may do and this is when you have a past completed date and then EITHER a pending or a Pending approval date
They are purely date columns for if it is a completed certificate, one which is pending or one which is pending approval - we need to clearly see where we are compliant and where we are not. - mathetesNov 13, 2023Silver Contributor
SGeorgie Seeing that image does not allay my questions about the basic design....that aside, I'm wondering if you could just employ the IFS function, rather than nesting IFs several levels deep. The hyperlink here will take you to a resource that describes IFS.
- SGeorgieNov 14, 2023Brass Contributori am not sure i can wrk out how to do IFS as all examples are based on 1 cell not multiple
- mathetesNov 14, 2023Silver Contributor
i am not sure i can wrk out how to do IFS as all examples are based on 1 cell not multiple
Those are only examples, not the only possible ways to construct the conditions in an IFS formula.
The key point, as contrasted with IF, is that in IFS you have to enter the conditions in an order/sequence in recognition of the fact that:
- The IFS function does not go through each and every condition.
- The IFS function stops evaluating as soon as it meets a condition/consequence in which the condition is satisfied.
Also important, once you've got it working, IFS is a lot more "readable" to the human eye and brain, than a deeply nested set of IF conditions.
You can easily construct something like
=IFS(AND(condition1,condition2),consequenceA,OR(condition3,condition4),consequenceB,.......)making it as complicated with those AND / OR combinations as the situation warrants.
- SGeorgieNov 14, 2023Brass Contributori attach dummy data