SOLVED

Combining RIGHT function with VLOOKUP with multiple conditions

Copper Contributor

Screenshot 2024-05-02 121033.png

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

@BP-Moons 

 

On G1 place:

 

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

 

Drag down to fill all cells.

@BP-Moons 

in G2:

 

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

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

@BP-Moons 

 

On G1 place:

 

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

 

Drag down to fill all cells.

View solution in original post