Forum Discussion
ajl_ahmed
Jul 24, 2022Iron Contributor
What is the error in the formula of cell A5 of the attached file?
What is the error in the formula of cell A5 of the attached file? I am using the vlookup formula to return the corresponding text of the cell value B5.
=VLOOKUP(B5,CHOOSE({1,2},B7:B76,A7:A76),2,FALSE)You can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021. An alternative would be INDEX and MATCH.
3 Replies
- SergeiBaklanDiamond Contributor
One more variant
=IFERROR( INDEX( A7:A76, MATCH( B5, B7:B76, 0 )), "no such" )VLOOKUP() always works from left to right, XLOOKUP and INDEX/MATCH are more flexible.
- Riny_van_EekelenPlatinum Contributor
ajl_ahmed If you really do have Excel for O365, you should use XLOOKUP.
=XLOOKUP(B5,B7:B76,A7:A76) - OliverScheurichGold Contributor
=VLOOKUP(B5,CHOOSE({1,2},B7:B76,A7:A76),2,FALSE)You can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021. An alternative would be INDEX and MATCH.