Forum Discussion

littlevillage's avatar
littlevillage
Iron Contributor
Aug 02, 2022
Solved

Index function and #NUM! error

Hi, I write a formula and it shows #NUM! error I have added an image and the link of the sample file below Please have a look Thank you https://docs.google.com/spreadsheets/d/1Iu_e8GkvtZ9r...
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Aug 02, 2022

    littlevillage The formula in column K returns a hyphen when the VLOOKUP doesn't find a match. Change that to the number 0 (no quotation marks). Then the formula in X5 will sort correctly.

     

    By the way, since you have a modern Excel version that supports dynamic arrays, why not skip using VLOOKUP. Better to look into XLOOKUP. Add more flexibility and no need for IFERROR as XLOOKUP includes an argument [if_not_found].

Resources