Since you say that your formula works when you copy and paste the lookup
value between files, then there's probably nothing wrong with the formula.
You also checked the length of the cells for any leading or trailing
invisible characters and found them to be absent.
So, the only thing that I can think of is ... what's *between* the names?
I'd say that there's a good possibility that you *don't* have a normal
<Space CHAR(32) in between the names, but some other character, maybe a
CHAR(160), non-breaking space.
Type
bob weir
in A1
In B1 enter this:
=CODE(MID(A1,4,1))
You should get a return of 32.
Use this same formula on one of your cells that's giving you a problem and
see what return you get.
Make sure that the second argument of the MID() function matches the "space"
placement of the cell you're testing.
If it comes back with something other then 32, you can use that information
to <Edit <Replace the "bad" character *out* of the column that you're
using for a lookup value.
--
HTH,
RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
"Scott" wrote in message
...
Im having a problem with a VLOOKUP formula thats not working and I could
use some help. Heres an example of my problem.
File 1:
A1 (name): Bob Weir
B1 (sales): $100,000
File 2:
A1 (name): Bob Weir
B1(state): California
C1(vlookup to File 1): Im trying to bring in the $100,000 from File 1 for
Bob Weir.
Heres the troubleshooting Ive done so far:
1.Ive used the =Len formula to make sure that there are no spaces after the
name and each cell has the same number of characters.
2.Ive tried to use both the General and Text format for both A1 cells and
the VLOOKUP doesnt work with either format.
3.When I take cell A1 and Copy - Paste Special - Values cell A1 from File
1 to cell A1 of File 2, then my VLOOKUP works. Unfortunately, this isnt a
solution because I have a lot of rows and the names are not in the same
order
in the two files.
From the troubleshooting Ive done, it looks the values arent really equal
in the various A1 cells but they appear identical. Any thoughts on how to
fix
my VLOOKUP? Thanks in advance for your help.
-Scott
|