Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Macro to look up and match names?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FJ - 23 May 2008 03:26 GMT
I have a spreadsheet with a column of names and email addresses.  I have to
replace these with a last name and first initial that can be found on another
worksheet.  The problem is that each cell contains more than one name and/or
email address, and they all have to stay that way.  So, for instance, if I
have all of the following in cell A1:

John Smith, Jane Doe, F. Smith, agreen@xyz789.com

I want to get the following result also still in one cell:

Smith, J, Doe, J, Smith, F, Green, A

The other problem is the way that the data is set up on the other worksheet.
It is set up like this:

John Smith             Smith, J               jsmith@abc123.com            
J. Smith
Andrew Green        Green, A              agreen@xyz789.com           A. Green
Fred Smith             Smith, F              fsmith@xyz789.com            
F. Smith
Jane Doe                Doe, J                 jdoe@abc123.com              
J. Doe

The match might not be found in the same column every time, so I don’t think
a function like VLOOKUP would work.  I’m not sure that any of the regular
functions would work.  I think it probably needs a macro.

Is what I’m trying to do even possible?

Thanks in advance for any information.
FJ - 23 May 2008 07:27 GMT
This is just to clarify the data set up in my original post.  For some
reason, it came through all jumbled up so that you can't tell what
information is in what column.  Here is the data again without the email
addresses.  I think that might be what threw it off.  Hopefully this will
post correctly.

John Smith                      Smith, J                    J. Smith
Andrew Green                 Green, A                   A. Green
Fred Smith                      Smith, F                   F. Smith
Jane Doe                         Doe, J                      J. Doe

If it doesn't, I guess I will just try to rephrase my question in the
following way:  Can VLOOKUP, INDEX, or MATCH be used to look up or match
individual names when there is more than one name in a cell?

Thanks in advance for any information anyone can provide and sorry for the
confusing data.

> I have a spreadsheet with a column of names and email addresses.  I have to
> replace these with a last name and first initial that can be found on another
[quoted text clipped - 26 lines]
>
> Thanks in advance for any information.
ryguy7272 - 30 May 2008 15:39 GMT
Try Vlookup with a wildcard:
=vlookup("*"&"aaa",
=vlookup("&"*"aaa",

Regards,
Ryan--
Signature

RyGuy

> This is just to clarify the data set up in my original post.  For some
> reason, it came through all jumbled up so that you can't tell what
[quoted text clipped - 44 lines]
> >
> > Thanks in advance for any information.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.