Trusted Members
February 13, 2021
Hi Jayendra!
Your OR(IF) statements already have what to do if the statements are false. Either nix the first IF statement and have the formula read
=OR(IF(AND(I9="Yes",I8="No"),DATEDIF(B9,C9,"d"),"NA"),if(and(i9="yes",i8="yes",B9=C8),DATEDIF(B9,C9,"d")-1,"NA")).
or re-write it so that if neither of the OR statements are true the result would read NA
=if(or(IF(AND(I9="Yes",I8="No"),DATEDIF(B9,C9,"d")),if(and(i9="yes",i8="yes",B9=C8),DATEDIF(B9,C9,"d")-1)),,"NA").
If your looking for a TRUE/FALSE answer 86 the "NA" altogether. Not exactly sure what your desired result is so I hope one of these solutions gets you started on your solution.
Active Member
December 3, 2021
Many thanks, Jessica. The first formula you suggested says True and the second NA. I am still not getting the desired number of days required. Following is the table for which I need result on the last column (Additional Allowance days). The purpose is to avoid counting one day more if a person is moving from one applicable 'Additional Allowance Station' to another (you see, the departure date of Place C and the arrival date of D are the same, and both fall under additional allowance station; so to avoid double counting 25/08/21. Thank you in advance for your support
Place | ARRIVAL DATE | DEPARTURE DATE | Additional Allowance Station | Additional Allowance days |
A | 07/08/21 | 07/08/21 | No | - |
B | 07/08/21 | 24/08/21 | No | FALSE |
C | 24/08/21 | 25/08/21 | Yes | NA |
D | 25/08/21 | 10/10/21 | Yes | NA |
Trusted Members
February 13, 2021
VIP
Trusted Members
December 7, 2016
VIP
Trusted Members
December 7, 2016
VIP
Trusted Members
December 7, 2016
Hello,
Sorry, no file attached. If you’re having problem with getting correct results using AND / OR logic then perhaps this article can give you some help.
Br,
Anders
1 Guest(s)