Forum Discussion
C45_2022
Jun 23, 2022Copper Contributor
If function in excel
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.
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"
- mathetesSilver Contributor
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"