SOLVED

If function in excel

Copper Contributor

I have column A on sheet 1 with item codes, column B on sheet 1 with item descriptions.

  • On column B on sheet 2, I would like to use if function so I can type any description on any cell which will give column A on sheet 2 its code.

 

Please assist.

2 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

@C45_2022 

 

Here's a formula that does what I think you're describing. If I interpreted you incorrectly, please come back with a more complete description. see the attached workbook as well

=XLOOKUP(B2,Sheet1!$B$2:$B$5,Sheet1!$A$2:$A$5,"NA",0)

 

Be aware though that this only works for descriptions that are valid; not "any description"

 

@mathetes 

I liked the way you understand and interpret my problem so well even though I did not give a concise explanation

I copied the formula and pasted it and it worked.

Love your understanding of formulas/function.

Thanks allot. So helpful.

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@C45_2022 

 

Here's a formula that does what I think you're describing. If I interpreted you incorrectly, please come back with a more complete description. see the attached workbook as well

=XLOOKUP(B2,Sheet1!$B$2:$B$5,Sheet1!$A$2:$A$5,"NA",0)

 

Be aware though that this only works for descriptions that are valid; not "any description"

 

View solution in original post