Excel - When data look exactly the same but...

Asked By Maki
19-Feb-10 12:49 AM
Hi all,

What's the cause of incidents when data in two cells, looking exactly the
same, are not recognised by Excel as the same?

It happens quite often when:
- vlookup function does not return any value even though the lookup_value
exist and looking exactly the same in lookup table;
- the same data appears multiple times when you do advanced filtering and
check "unique records only" checkbox; etc. etc.

I have looked at usual suspects, like numbers entered as text?, space at the
end of the record?, so on so forth, but, believe it or not, sometimes, these
things are exactly the same, at least to my naked eyes, and still Excel seems
to think they are different.

What other causes can there be in cases like this?

Thanks for your help.

Cheers,
--
Maki @ Canberra.AU
Excel
(1)
VLOOKUP
(1)
NBSPs
(1)
Utherwiseyou
(1)
Kryptonite
(1)
Incidents
(1)
Suspects
(1)
Checkbox
(1)
  Ross in Oz replied to Maki
19-Feb-10 05:20 AM
Try selecting the whole column of the Lookup_value and go to Data / Text to
Columns  - select Delimeted  then Finish (if your data is text you will need
to select text before Finish utherwiseyou will lose preceeding zeros)
Do the same on the column you are looking up

the vlookup can be in place as you do it and if successful the data will
come through

when you do the text to columns you will see the data format
  Joe User replied to Maki
19-Feb-10 10:06 AM
Sorry, but my mindreading powers are weakened by the kryptonite sitting next
to me.

Exactly how are you using VLOOKUP?  What is the lookup value?  What values
are in the lookup table?  How are the values derived?  For example, is text
imported; are numbers the result of formulas?

If you are looking at numbers with decimal fractions that are the result of
formulas, it is quite common that the displayed value is not exactly equal to
the underlying actual value.

If you are looking at text that was imported, it is quite common that what
appears to be spaces are actually a non-breaking spaces (NBSPs), ASCII code
160.

There are ways of dealing with both.  But it really is not worth the time to
explore each problem, since there is no way to know which one applies to your
situation, if either does.


----- original message -----
  Jim Thomlinson replied to Maki
19-Feb-10 10:16 AM
Assuming you are not finding leading or trailing spaces and the information
being looked up is numeric in nature then I would suggest that the issue is
most likely text and numbers. If cells with numeric data are being stored as
text just chaning the cell format does not change the underlying text to
numbers. You still need to convert the text to numbers. Easiest wasy is to
place a 1 in an unused cell Copy it and paste special | Multiply over the
range of numbers. To catch this error in your vlookup you can use countif to
distinguish text from numbers. Countif treats everything as text so it will
find matches when one cell is text and the other number.

=if(countif(A1:A10, D1) = 0, "Not Found", vlookup(D1, A1:B10, 2, 0))

If countif finds a match then it proceeds to the vlookup. If the vlookup
returns an error then you have a data type mismatch between text and number.
--
HTH...

Jim Thomlinson
Create New Account
help
Win7 VirtualStore Weirdness with Excel 2002 and earlier Excel I thought I'd share a weird experience I had today in case it saves installer for it - - which registers it as an add-in for all installed versions of Excel - - and tested it. Fine in Windows 2000 in all installed versions of Excel. Boot to Windows XP, fine there too. Boot to Windows 7. Fine in Excel 2010, 2007, and 2003. But Excel 2002 and 2000 were still loading the old version of the add-in. I uninstalled the add-in, made sure it was gone, and reinstalled it. Same problem in Excel 2002 and earlier; still works fine in Excel 2003 and later. I opened the VB editor in Excel 2003 and in Excel 2002
32 bit DLL with 64 bit Excel 2010 Excel We have an app which creates large Excel workbooks. For example, one workbook has 1, 000 worksheets. In other cases there are fewer worksheets but the Excel file can be 80 MB or larger. Since this sometimes crashes Excel 2007 and 2003, I am considering using 64 bit Excel 2010. Would 64-bit Excel be more reliable with workbooks this size than 32-bit Excel? Is 32-bit Excel 2010 any more (or less) reliable with large workbooks than Excel
Pb de recalcul Excel Bonjour, J'ai un problème de recalcul de ma feuille excel. J'importe une colonne qui se retrouve en texte 0000 0000 0000 0000 FFF0 7FFF cela soit automatique ? Merci d'avance à ceux qui se pencheront sur mon cas. Caroual Excel - French Discussions WorksheetFunction (1) AddIns (1) Worksheets (1) Excel 2007 (1) Macro (1) Proc (1) LEFT (1) VBA (1) Bonsoir Dans la doc sur 426a74cc@news.free.fr. . . Bonjour, J'ai un probl?me de recalcul de ma feuille excel. J'importe une colonne qui se retrouve en texte 0000 0000 0000 0000 FFF0 7FFF e ou Bonjour, D??butons par une petite explication : Auparavant sous les versions ant??rieures ?? Excel 2007, si les 2 macros compl??mentaires ("utilitaire d'analyse" ou titre d'exemple directement est diff??rente, certains pourraient bien ??prouver des difficult??s. Tous (ou presque) savent qu'Excel sous les versions pr??c??dentes ?? Excel 2007, ne fait pas la traduction des fonctions d'une langue ?? l'autre lorsqu'elles
how to find union of two arrays Excel Hello, Does anyone know a means of comparing two very large arrays (> 50000 elements) to to both arrays? I have tried using looping functions and that is far too slow. Excel Programming Discussions GetCurrentProcessId (1) Worksheets (1) Excel 2003 (1) Excel 2007 (1) Workbooks (1) Excel (1) Statistics (1) Relative (1) hi, i do not know why your looping is far the CPU is faster. There are other programming constructs available which are faster. I know Excel can run faster than this, but I do not know any tricks on how to 34, Andrew a ?crit : Why use code at all? You can do this with straight Excel formulas. Assuming your range "A" is located on Sheet1, Columns A and B, starting in 1:A$500, A1), MATCH(A1, Sheet1!A$1:A$500, 0), "") Rick Rothstein (MVP - Excel) If you do not want to do it with worksheet formulas, as suggested by Rick
Excel and the Math Coprocessor for DLLs Excel I have a large Win32 DLL (10 MB) that is called from my user interface (written in C++) or from VBA in MS Excel. In my user interface, the DLL runs in its own space and calculates correctly. Under Excel VBA, my DLL is having problems with double precision accuracy. The following test passes in bottom CHPTST = (DIVTWO * bottom) - top In my user interface, the chptst result is zero. Under Excel VBA, the chptst result is 0.2851266E-09. I have tried resetting the math coprocessor _status87 (); if (old87Status ! = 0) new87result = _control87 (new87ControlWord, new87ControlMask); I have verified this behavior in both Excel 2003 and 2010. Does anyone have any ideas here ? Sincerely, Lynn McGuire Excel Discussions Windows XP (1) Visual Studio 2005 (1) Microsoft Excel (1) Visual Studio (1) Excel 2010 (1) Excel 2003 (1) Excel 2007 (1) Workbooks (1