View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default add extra space before comma

Perhaps you can do a "wild card" lookup:

=VLOOKUP("*Doe*", C:D,2,0)

OR

=VLOOKUP("*" & A1 & "*",C:D,2,0)

where A1="Doe"

HTH

"clarknv" wrote:

That worked great!
Maybe you can help me with one other problem on the same 2 reports.
I have also noticed a problem on my vlookup where one report might be
missing Jr or has an extra last name if they were married etc. What can I do
to get around the fact that they are missing Jr/Sr or maiden-married name.

"Toppers" wrote:

If there is only ONE comma try Edit= Replace=Find What : ","(no quotes)
=Replace with: " ," (again, no quotes) [blank followed by comma].

Test first!

"clarknv" wrote:

I have 2 reports that i use in my department. 1 report lists names but it
has an extra space after the last name: Doe , John
The other report does not have the extra space: Doe, John.
The report with the extra spaces has been used for a long time and many of
our daily functions depend on this information. Is there a way to add an
extra space after the last name in the second report so that the names match
the main report?
I am currently using a vlookup to extract numbers from each report but the
names don't match. I tried using true instead of false in the vlookup but it
pulls the name closest to it which is the wrong information (I have tried
many times to get the department that creates the extra space report to just
remove the extra space with no luck)