SOLVED

# Combining RIGHT function with VLOOKUP with multiple conditions

Copper Contributor

# Combining RIGHT function with VLOOKUP with multiple conditions

I am trying to write a function that will look up if the last character in A column is "D" or "L" and if this is the case will then move the last character to G column. When i try to enter the formula shown it shows #Value error, is there a way to fix this formula?

3 Replies
best response confirmed by BP-Moons (Copper Contributor)
Solution

# Re: Combining RIGHT function with VLOOKUP with multiple conditions

On G1 place:

=IF(OR(RIGHT(A1,1)="L",RIGHT(A1,1)="D"),RIGHT(A1,1),"")

Drag down to fill all cells.

# Re: Combining RIGHT function with VLOOKUP with multiple conditions

in G2:

=LET(letter, RIGHT(A2), IF(OR(letter={"D", "L"}), letter, ""))

# Re: Combining RIGHT function with VLOOKUP with multiple conditions

This works perfectly thank you, i tried it with an IF Or function to begin with but used the wrong syntax for multiple conditions
1 best response

Accepted Solutions
best response confirmed by BP-Moons (Copper Contributor)
Solution

# Re: Combining RIGHT function with VLOOKUP with multiple conditions

On G1 place:

=IF(OR(RIGHT(A1,1)="L",RIGHT(A1,1)="D"),RIGHT(A1,1),"")

Drag down to fill all cells.