Forum Discussion

Nandhu19940's avatar
Nandhu19940
Copper Contributor
Aug 10, 2020

Or condition for vlookup output

For my condition if suppose vlookup has two specific output based on that I need to condition with if how it is possible
Formula: Vlookup(A2, C:D,2,false) this will produce either #N/A or - as output including some other outputs as well.

For the above formula how can I condition it for if output is NA means put letter NO-REC, - means put AST please help

11 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Nandhu19940 

     

    As far as I have understood the problem definition correctly or have translated it, these formulas could help you.

     

    This can be used to suppress the error message

    ISNA(VLOOKUP($A$2,$C:$D,2,FALSE))

     

    with this formula your desired text should be appear

    =IF(ISERROR(VLOOKUP(A$2,$C:$D,2,0))," NO-REC",VLOOKUP(A$2,$C:$D,2,0))

    * Provided that I have correctly translated the formulas into English.

     

    Nikolino

    I know I don't know anything (Socrates)

    * Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

    * Beware of scammers posting fake support numbers here.

    • Nandhu19940's avatar
      Nandhu19940
      Copper Contributor
      Thanks for stopping by and answering my query,

      This formula will produce two output
      1) #N/A
      2) -
      So need to provide condition based on my above two outputs
      If #N/A or - occurs I need to do another lookup I don't know how to provide or or if condition in this scenario
      • NikolinoDE's avatar
        NikolinoDE
        Platinum Contributor
        an example file (without sensitive data) would be advantageous ... for you and for those who would like / are allowed to help

Resources