• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Two cells in different workbooks have the exact number, why does the VLOOKUP not find in an array?

Weldon

New Member
11/5/2015 DNS JEH 8:00 8:30 1 BAL GRANDE-MERCADO, GLENDA XIOMARA @ 205-475-594 ARMV 25 Released ES TABE, KEVIN M., ESQ. SP I P 205475594
 
It is important to note: that one of the cells contents was generated by a formula, and in the other workbook the exact same number exists not generated by a formula.

When I key-in the number in the workbook with the cell derived by a formula the VLOOKUP array does find the cell and produces the desired result.

Both cells are formatted as General. . .
 
It might be an extra space, or a non printing character, or similar.

I blogged about a similar situation at http://dailydoseofexcel.com/archives/2014/08/09/one-of-these-things-is-not-like-the-other/

Furthermore, there's a good explanation of non printing characters at https://support.office.com/en-in/ar...fe5303222c9d?ui=en-US&rs=en-IN&ad=IN&fromAR=1

In regards to non printing characters, in the Unicode character set, there is an additional space character called the nonbreaking space character that has a decimal value of 160. It looks identical to a space character to you and me, but not to Excel. I've snuck a non breaking space into the text in B3 right after the 8:30 bit of text, and an you can see, it looks identical to B2.

But I've also array entered this formula into B5, that returns the string in B2 up to the point that it doesn't match the string in B3:
=LEFT(B2,MATCH(FALSE,MID(B2,1,ROW(INDIRECT("A1:A"&LEN(B2))))=MID(B3,1,ROW(INDIRECT("A1:A"&LEN(B3)))),0))

And these formulas show the character code of the underlying differing character:

=CODE(MID(B2,MATCH(FALSE,MID(B2,1,ROW(INDIRECT("A1:A"&LEN(B2))))=MID(B3,1,ROW(INDIRECT("A1:A"&LEN(B3)))),0),1))
=32

=CODE(MID(B3,MATCH(FALSE,MID(B2,1,ROW(INDIRECT("A1:A"&LEN(B2))))=MID(B3,1,ROW(INDIRECT("A1:A"&LEN(B3)))),0),1))
=160Identify non breaking space.gif
See the attached file.

Thanks for the great question: I'm going to put a similar example into the book I'm writing.
 
Hmm. For some reason I can't seem to upload the sample file. That's happened a few times recently. I'll try again later.
 
Hi,

The common reason behind it :

a) Extra Spaces (1)Trim will help 2) You may also try Ctrl + h -- Press Space in Find column -- Let the replace column blank -- Press Replace All. So that entire space could be eliminated

b) Data is in text format (You will have to convert that into number)

3) Say your data is written like this

Cell1 : '99
Cell2 L 99

Then you will have eliminate '

Hope it may help you.
 
Thank everyone for your great help. Oddly, the problem was resolved copying one of the cells and using "special paste" values and number formats
 
Back
Top