SOLVED

combining two if statements in one with a vlookup

Brass Contributor

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
best response confirmed by Janedb (Brass Contributor)
Solution

@Janedb 

=VLOOKUP(E16,'Point System'!U:Y,R15+1))

Thank you! You are a star as always :)

@Hans Vogelaarme 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)

@Janedb 

I'm afraid that I don't understand. Could you try to explain in more detail, perhaps with a screenshot or attaching a sample workbook?

@Janedb 

Perhaps

=IFNA( INDEX( Source!D:D, MATCH(1, INDEX( (Source!A:A = A2)*(Source!B:B = B2), 0), 0 ) ), "no such" )

@Sergei Baklan I will use this one and see if it returns the value that I am looking for. Thank you.

1 best response

Accepted Solutions
best response confirmed by Janedb (Brass Contributor)
Solution

@Janedb 

=VLOOKUP(E16,'Point System'!U:Y,R15+1))

View solution in original post