#1   Report Post  
Posted to microsoft.public.excel.misc
marksuza
 
Posts: n/a
Default vlookup Problem


HI,

I am having a little problem with a vlookup formula and I was wondering
if anyone could help me. I copied and pasted two tables from the
internet to excel and I trying to combine information from both (they
have one column in common), I am using a vlookup formula but it is not
working, =VLOOKUP(A6,$N$4:$O$348,2). Now, if I choose a specific
record and copy and paste the name of that record (A6, for example) to
the corresponding record in column 'N', the formula works. I guess
excel is not identifying the names are the same. Can anybody help me
solve this? Thanks a lot.

Regards,

Mark


--
marksuza
------------------------------------------------------------------------
marksuza's Profile: http://www.excelforum.com/member.php...fo&userid=2659
View this thread: http://www.excelforum.com/showthread...hreadid=495506

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default vlookup Problem

Hi, Mark-
It sounds like the entries in the different files are visually
identical but not truly identical. For example, one file may contain
"John Doe" and the other "John Doe " (note the extra space at the end
of Doe). Or the entry may start out with an apostrophe, which happens
frequently with imported files.

Is this happening in your data?

  #3   Report Post  
Posted to microsoft.public.excel.misc
marksuza
 
Posts: n/a
Default vlookup Problem


Yes Dave, I just checked and in one of them I have an extra space at the
end. Is there a formula to get this space out in all the rows. Thanks
for the help once again.

Regards,

Marcos


--
marksuza
------------------------------------------------------------------------
marksuza's Profile: http://www.excelforum.com/member.php...fo&userid=2659
View this thread: http://www.excelforum.com/showthread...hreadid=495506

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default vlookup Problem

Maybe inserting a helper column of cells with formulas like:

=trim(a1)
and drag down.
Then copy|paste special|values over the original range and delete the helper
column.

=trim() will remove leading/trailing/repeated embedded spaces, too

If you want to cheat (this is usually a bad idea!):

=VLOOKUP(A6,$N$4:$O$348,2)
becomes
=VLOOKUP(trim(A6),$N$4:$O$348,2)

But it's always better to fix the data.

marksuza wrote:

Yes Dave, I just checked and in one of them I have an extra space at the
end. Is there a formula to get this space out in all the rows. Thanks
for the help once again.

Regards,

Marcos

--
marksuza
------------------------------------------------------------------------
marksuza's Profile: http://www.excelforum.com/member.php...fo&userid=2659
View this thread: http://www.excelforum.com/showthread...hreadid=495506


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Vlookup, What is correct formula for problem below? Bill R Excel Worksheet Functions 7 August 2nd 05 04:01 AM
VLOOKUP Problem Tosca Excel Worksheet Functions 7 July 23rd 05 10:43 PM
VLOOKUP, OFFSET, MATCH PROBLEM, HELP? Steve Excel Worksheet Functions 0 January 30th 05 09:11 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"