Forum Discussion

Janedb's avatar
Janedb
Iron Contributor
Mar 01, 2021
Solved

combining two if statements in one with a vlookup

Hi all, my formula works if I enter it individually but as soon as I combine into one then it adds instead of using the scenarios, any advice on how to bring two scenarios together in one formula?

 

The scenarios - if Q15=3 then the answer must return the values as per vlookup but if Q15=4 then it should return another value as per vlookup.

 

=IF(R15=3,0,0)+VLOOKUP(E16,'Point System'!U:Y,4,0)AND/OR(IF(R15=4,0,0)+VLOOKUP(E16,'Point System'!U:Y,5,0))

6 Replies

    • Janedb's avatar
      Janedb
      Iron Contributor

      HansVogelaarme again. I want to change the statement to use two scenarios in one vlookup, is that possible? I want to lookup the account number and month of billing to give me a result. Taking into consideration is that a date is used.
      =VLOOKUP(Acc number,'Source'!B:B,)&VLOOKUP(Month,'Source'!A:D,4,0)
      =VLOOKUP(B2,'Source'!B:B,)&VLOOKUP(A2,'Source'!A:D,4,0)

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Janedb 

        Perhaps

        =IFNA( INDEX( Source!D:D, MATCH(1, INDEX( (Source!A:A = A2)*(Source!B:B = B2), 0), 0 ) ), "no such" )
    • Janedb's avatar
      Janedb
      Iron Contributor
      Thank you! You are a star as always 🙂

Resources