Forum Discussion

lianda88's avatar
lianda88
Copper Contributor
Nov 03, 2022
Solved

IF this than that function in excel

Hi,

 

I am wondering if there is a formula for the following:

Column T (50 rows) represents descriptions

Column V (50 rows) represents a code which is linked to the description

For example:

 TV
1Apple1234
2Pear2234

 

Column H (800 rows) is a drop-down of the descriptions in column T

Column F (800 rows) should represent the code (column V) matching the description in column H 

 

For example:

 FH
1=V1=T1
2=V49=T49

 

 

So I am looking for an efficient way to implement in Column F something like:

IF (H1=T1;V1) or (H1=T1:T50;V1:V50) Needless to say, these formulas do not work

 

to automatically adjust the code in column F when a description is appointed in column H.

 

Is there a clever way to do so?

Hope someone can help me with this.

 

Thank you in advance!

  • lianda88 

    =IFERROR(INDEX($V$1:$V$50,MATCH(H1,$T$1:$T$50,0)),"")

    You can try INDEX and MATCH. An alternative could be VLOOKUP. If you work with Office365 you can apply XLOOKUP.

     

2 Replies

  • lianda88 

    =IFERROR(INDEX($V$1:$V$50,MATCH(H1,$T$1:$T$50,0)),"")

    You can try INDEX and MATCH. An alternative could be VLOOKUP. If you work with Office365 you can apply XLOOKUP.

     

    • lianda88's avatar
      lianda88
      Copper Contributor
      YES IT WORKS!!! Thank you so much for your response!

Resources