Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
FJ FJ is offline
external usenet poster
 
Posts: 90
Default Macro to look up and match names?

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,

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

J. Smith
Andrew Green Green, A
A. Green
Fred Smith Smith, F

F. Smith
Jane Doe Doe, J

J. Doe

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

Is what Im trying to do even possible?

Thanks in advance for any information.
  #2   Report Post  
Posted to microsoft.public.excel.programming
FJ FJ is offline
external usenet poster
 
Posts: 90
Default Macro to look up and match names?

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.






"FJ" wrote:

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,

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

J. Smith
Andrew Green Green, A
A. Green
Fred Smith Smith, F

F. Smith
Jane Doe Doe, J

J. Doe

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

Is what Im trying to do even possible?

Thanks in advance for any information.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Macro to look up and match names?

Try Vlookup with a wildcard:
=vlookup("*"&"aaa",
=vlookup("&"*"aaa",


Regards,
Ryan--
--
RyGuy


"FJ" wrote:

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.






"FJ" wrote:

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,

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

J. Smith
Andrew Green Green, A
A. Green
Fred Smith Smith, F

F. Smith
Jane Doe Doe, J

J. Doe

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

Is what Im trying to do even possible?

Thanks in advance for any information.

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
Match similar names Sam Excel Worksheet Functions 3 January 26th 10 12:50 PM
match names in 2 different columns Mike Excel Discussion (Misc queries) 6 May 26th 06 03:46 PM
VLOOKUP and LEN/ISNA to match names? LTUser54 Excel Worksheet Functions 6 May 22nd 06 09:08 PM
Changing VB Component Names to match Worksheet names using VBE Philip Excel Programming 1 April 12th 05 05:37 PM
Change names of files in a folder to match names in Excel Column saybut Excel Programming 4 February 9th 04 06:26 PM


All times are GMT +1. The time now is 10:31 AM.

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"