Forum Discussion

LesKing's avatar
LesKing
Brass Contributor
Jun 14, 2023
Solved

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

  • LesKing 

    =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

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    LesKing 

    =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!

    • LesKing's avatar
      LesKing
      Brass Contributor
      Wow, that was quick!!
      It does exactly what I want. Thanks a lot for the guidance.
      Les King
      • NikolinoDE's avatar
        NikolinoDE
        Platinum Contributor
        I am glad that I could help you.
        I wish you continued success with Excel!

Resources