View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
clarknv clarknv is offline
external usenet poster
 
Posts: 10
Default add extra space before comma

The problem is that the format is this: LastName , FirstName
It could show up like this in the other report: LastName Suffix , FirstName
-or- LastName MarriedName , FirstName -or- Lastname , First Name Initial, or
any combination. So the wildcard needs find a match even though the extra
characters could be in the beginning, middle or end of the string.
(Impossible! Right???) If our departments would just talk to one another and
get a standard format for names, I would not be greying so early!

"Toppers" wrote:

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)