Forum Discussion
Need help with syntax for using an "OR" statement to join two formulas
Hi,
I have two formulas (see below), both of which work perfeccyly for me, but I need them combined into a single formula joined by an OR statement, but I cannot get the syntax right.
=IF(XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE)="","Awaits_ training",XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE))
=IF(XLOOKUP(D7,DATABASE!D:D,DATABASE!AC:AC)="Not Required","Not Applicable")
I would be very grateful for help/advice.
Thanking you in anticipation.
Les King
=IF(OR(XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE)="",XLOOKUP(D7,DATABASE!D:D,DATABASE!AC:AC)="Not Required"),IF(XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE)="","Awaits_training","Not Applicable"),XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE))
This formula uses the OR function to check if either of the two conditions are met. If either condition is true, the formula returns “Awaits_training” if the first XLOOKUP returns an empty string, or “Not Applicable” if the second XLOOKUP returns “Not Required”. If neither condition is true, the formula returns the result of the first XLOOKUP.
I hope this helps!
4 Replies
- NikolinoDEPlatinum Contributor
=IF(OR(XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE)="",XLOOKUP(D7,DATABASE!D:D,DATABASE!AC:AC)="Not Required"),IF(XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE)="","Awaits_training","Not Applicable"),XLOOKUP(D7,DATABASE!D:D,DATABASE!AE:AE))
This formula uses the OR function to check if either of the two conditions are met. If either condition is true, the formula returns “Awaits_training” if the first XLOOKUP returns an empty string, or “Not Applicable” if the second XLOOKUP returns “Not Required”. If neither condition is true, the formula returns the result of the first XLOOKUP.
I hope this helps!
- LesKingBrass ContributorWow, that was quick!!
It does exactly what I want. Thanks a lot for the guidance.
Les King- NikolinoDEPlatinum ContributorI am glad that I could help you.
I wish you continued success with Excel!