Forum Discussion

tanacal's avatar
tanacal
Brass Contributor
Jan 23, 2021

Used xlookup and came back with result #n/a although text fields are the same

Hi, can anyone give me some help please?

I have the following downloaded data from a financial system:


 

When I tried to pull in the number column from the matched description in another table, I received #n/a:


I also realized the text fields are not equal although they are the exact same text.

 

I have checked the length of both text and length is the same 51 characters.


Can you please help me? Thanks for your help in advance.

Anna

  • Steve1330's avatar
    Steve1330
    Brass Contributor

    tanacalIs it possible you have one or more trailing spaces in the target string in column C or the lookup value in Column Q? Try using TRIM function to correct for this.

    • TANACAL125's avatar
      TANACAL125
      Copper Contributor

      Steve1330 

       

      Thanks for your help. Appreciated. 

       

      I have tried to use TRIM function to make the correct, but it was not working.

       

      I think you are right on trailing spaces in the target string in column C. I just tried to use =SUBSTITUTE(C2,CHAR(160)," ") to fix it and it came out some improvements. Below is the picture now (Column U is result of xlookup after replacing the Column C with formula result):

       

      Do you think if you can provide me suggestion for the last two #N/As? Thanks,

       

       

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        TANACAL125 To find which characters are causing the problem, you can perhaps use the formula demonstrated in the attached workbook. It lists out each and every character in your text and puts the corresponding code next to it. That way, you can visualise the white space in your text and use TRIM, CLEAN and/or SUBSTITUTE to get rid of them.

Resources