Question : using a where clause in a vertical lookup excel

Folks how you are well!

 I have the following vertical lookup

IF(ISERROR(VLOOKUP(LEFT(A2,2)&"*",$P$1:$Q$100,2,FALSE)),"",VLOOKUP(LEFT(A2,2)&"*",$P$1:$Q$100,2,FALSE))

it compares the first two letters of a row and does a conversion

eg BT = TUG

thats greate though my data is a little more unsanitized on the one db

here I have

BT = TUG which is fine but

also

BTU=BTU

how can I add a where clause into a vertical lookup thus only doing a coversion where  eg Column A <> Column B

thus BTU will not become TUG  but be converted to BTU

R

Answer : using a where clause in a vertical lookup excel

To match the first three letters use:

IF(ISERROR(VLOOKUP(LEFT(A2,3)&"*",$P$1:$Q$100,2,FALSE)),"",VLOOKUP(LEFT(A2,3)&"*",$P$1:$Q$100,2,FALSE))
Random Solutions  
 
programming4us programming4us