Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Krista
 
Posts: n/a
Default Need help with lookup on text format

I have two worksheets with name fields, however the name fields are reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in worksheet
2.
  #2   Report Post  
Morrigan
 
Posts: n/a
Default


Let's say A13 contains "John, Smith" and B13 contains "Smith, John".

C13 = IF(AND(LEFT(A13,FIND(", ",A13)-1)=RIGHT(B13,LEN(B13)-FIND(",
",B13)-1)),"Match","No match")



Krista Wrote:
I have two worksheets with name fields, however the name fields are
reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in
worksheet
2.



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=465695

  #3   Report Post  
Morrigan
 
Posts: n/a
Default


Let's say A13 contains "John, Smith" and B13 contains "Smith, John".

C13 = IF(AND(LEFT(A14,FIND(", ",A14)-1)=RIGHT(B14,LEN(B14)-FIND(",
",B14)-1),LEFT(B14,FIND(", ",B14)-1)=RIGHT(A14,LEN(A14)-FIND(",
",A14)-1)),"Match","No match")


Krista Wrote:
I have two worksheets with name fields, however the name fields are
reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in
worksheet
2.



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=465695

  #4   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

Try the following formula in B2 of Worksheet 1 (and then fill down the
formula in column B)

=IF(SUMPRODUCT(--(A2=RIGHT(Sheet2!$A$2:$A$7,LEN(Sheet2!$A$2:$A$7)-FIND(",",Sheet2!$A$2:$A$7)-1)&",
"&LEFT(Sheet2!$A$2:$A$7,FIND(",",Sheet2!$A$2:$ A$7)-1))),"Y","")

This formula assumes that names are in column A in each worksheet starting
at Row 2. It is vital that the first and last names (or vice versa) in all
entries are in the same format (separated by a comma followed by a space).
Furthermore, change the '7's (there are five of them) in the formula as the
last row number of Sheet 2.

I tested the formula with five names in sheet 1 (A2 to A6) and six names in
sheet (A2 to A7), and it worked.

Regards,
B. R. Ramachandran

"Krista" wrote:

I have two worksheets with name fields, however the name fields are reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in worksheet
2.

  #5   Report Post  
Krista
 
Posts: n/a
Default

The name format:

John Smith worksheet 1 & Smith,John in worksheet 2

"B. R.Ramachandran" wrote:

Hi,

Try the following formula in B2 of Worksheet 1 (and then fill down the
formula in column B)

=IF(SUMPRODUCT(--(A2=RIGHT(Sheet2!$A$2:$A$7,LEN(Sheet2!$A$2:$A$7)-FIND(",",Sheet2!$A$2:$A$7)-1)&",
"&LEFT(Sheet2!$A$2:$A$7,FIND(",",Sheet2!$A$2:$ A$7)-1))),"Y","")

This formula assumes that names are in column A in each worksheet starting
at Row 2. It is vital that the first and last names (or vice versa) in all
entries are in the same format (separated by a comma followed by a space).
Furthermore, change the '7's (there are five of them) in the formula as the
last row number of Sheet 2.

I tested the formula with five names in sheet 1 (A2 to A6) and six names in
sheet (A2 to A7), and it worked.

Regards,
B. R. Ramachandran

"Krista" wrote:

I have two worksheets with name fields, however the name fields are reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in worksheet
2.



  #6   Report Post  
Krista
 
Posts: n/a
Default

Thanks, however the names are listed as follows:

John Smith (worksheet 1) & Smith,John (worksheet 2)

I believe there is away for me to seperate the name from worksheet 2 then I
could put the name back together in the order I need it?

"Morrigan" wrote:


Let's say A13 contains "John, Smith" and B13 contains "Smith, John".

C13 = IF(AND(LEFT(A13,FIND(", ",A13)-1)=RIGHT(B13,LEN(B13)-FIND(",
",B13)-1)),"Match","No match")



Krista Wrote:
I have two worksheets with name fields, however the name fields are
reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in
worksheet
2.



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=465695


  #7   Report Post  
Krista
 
Posts: n/a
Default

Could I break the name from worksheet 2 apart (Smith, John) to show John in
one cell and Smith in another cell, then I could put them back together as
John Smith?

Thanks for your help.

"B. R.Ramachandran" wrote:

Hi,

Try the following formula in B2 of Worksheet 1 (and then fill down the
formula in column B)

=IF(SUMPRODUCT(--(A2=RIGHT(Sheet2!$A$2:$A$7,LEN(Sheet2!$A$2:$A$7)-FIND(",",Sheet2!$A$2:$A$7)-1)&",
"&LEFT(Sheet2!$A$2:$A$7,FIND(",",Sheet2!$A$2:$ A$7)-1))),"Y","")

This formula assumes that names are in column A in each worksheet starting
at Row 2. It is vital that the first and last names (or vice versa) in all
entries are in the same format (separated by a comma followed by a space).
Furthermore, change the '7's (there are five of them) in the formula as the
last row number of Sheet 2.

I tested the formula with five names in sheet 1 (A2 to A6) and six names in
sheet (A2 to A7), and it worked.

Regards,
B. R. Ramachandran

"Krista" wrote:

I have two worksheets with name fields, however the name fields are reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in worksheet
2.

  #8   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,
If the name format is John Smith in Worksheet 1 and Smith,John in Worksheet
2 (i.e., no space after the comma), try the following formula (a modification
of the one in my previous reply)

=IF(SUMPRODUCT(--(A2=RIGHT(Sheet2!$A$2:$A$7,LEN(Sheet2!$A$2:$A$7)-FIND(",",Sheet2!$A$2:$A$7))&"
"&LEFT(Sheet2!$A$2:$A$7,FIND(",",Sheet2!$A$2:$ A$7)-1))),"Y","")

It, I believe, would work.

Regards,
B. R. Ramachandran

"Krista" wrote:

The name format:

John Smith worksheet 1 & Smith,John in worksheet 2

"B. R.Ramachandran" wrote:

Hi,

Try the following formula in B2 of Worksheet 1 (and then fill down the
formula in column B)

=IF(SUMPRODUCT(--(A2=RIGHT(Sheet2!$A$2:$A$7,LEN(Sheet2!$A$2:$A$7)-FIND(",",Sheet2!$A$2:$A$7)-1)&",
"&LEFT(Sheet2!$A$2:$A$7,FIND(",",Sheet2!$A$2:$ A$7)-1))),"Y","")

This formula assumes that names are in column A in each worksheet starting
at Row 2. It is vital that the first and last names (or vice versa) in all
entries are in the same format (separated by a comma followed by a space).
Furthermore, change the '7's (there are five of them) in the formula as the
last row number of Sheet 2.

I tested the formula with five names in sheet 1 (A2 to A6) and six names in
sheet (A2 to A7), and it worked.

Regards,
B. R. Ramachandran

"Krista" wrote:

I have two worksheets with name fields, however the name fields are reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in worksheet
2.

  #9   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

Use the following formula in B2 (in Worksheet 2) and drag it down the column
B,

=RIGHT(Sheet2!$A2,LEN(Sheet2!$A2)-FIND(",",Sheet2!$A2))&"
"&LEFT(Sheet2!$A2,FIND(",",Sheet2!$A2)-1)

It will flip Smith,John to John Smith

"Krista" wrote:

Could I break the name from worksheet 2 apart (Smith, John) to show John in
one cell and Smith in another cell, then I could put them back together as
John Smith?

Thanks for your help.

"B. R.Ramachandran" wrote:

Hi,

Try the following formula in B2 of Worksheet 1 (and then fill down the
formula in column B)

=IF(SUMPRODUCT(--(A2=RIGHT(Sheet2!$A$2:$A$7,LEN(Sheet2!$A$2:$A$7)-FIND(",",Sheet2!$A$2:$A$7)-1)&",
"&LEFT(Sheet2!$A$2:$A$7,FIND(",",Sheet2!$A$2:$ A$7)-1))),"Y","")

This formula assumes that names are in column A in each worksheet starting
at Row 2. It is vital that the first and last names (or vice versa) in all
entries are in the same format (separated by a comma followed by a space).
Furthermore, change the '7's (there are five of them) in the formula as the
last row number of Sheet 2.

I tested the formula with five names in sheet 1 (A2 to A6) and six names in
sheet (A2 to A7), and it worked.

Regards,
B. R. Ramachandran

"Krista" wrote:

I have two worksheets with name fields, however the name fields are reversed
on each worksheet.

Worksheet 1 list - first name, last name
worksheet 2 list - last name, first name

I need to compare to see if the person on worksheet 1 appears in worksheet
2.

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
Only text values matching using index/match lookup - data type pro Stanton Excel Worksheet Functions 1 August 2nd 05 01:05 AM
How do I convert dates to text keeping the format? sprlarry Excel Discussion (Misc queries) 3 May 16th 05 06:06 AM
Format a cell with numbers and user defined text Rod R. Excel Discussion (Misc queries) 0 March 30th 05 04:31 PM
Problem with wrap text format Mitch Excel Worksheet Functions 1 January 20th 05 09:46 AM
How do I format email addresses as Text only? Dstess Excel Worksheet Functions 5 January 9th 05 06:44 PM


All times are GMT +1. The time now is 05:49 AM.

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

About Us

"It's about Microsoft Excel"