Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sh0t2bts
 
Posts: n/a
Default splitting and rejoining text in cells

I have some data that I have pulled back from an SQL server that I need to
match but they clearly do not match in computer terms as A = B.

I have two columns that I need to compare

A B
1 "Fred Bloggs" "Bloggs, Fred"


clearly I can not use =if(A1 = B1,"Yes","No")

There is a slight twist as well, when "Fred Bloggs" was entered they might
be 1 or to spaces between the names and the same goes for "Bloggs, Fred"


Can you advise what function or set of functions I would use?

Many Thanks

Mark


  #2   Report Post  
Dave R.
 
Posts: n/a
Default

This seems to work;

=SUBSTITUTE(A1," ","")=MID(SUBSTITUTE(B1,"
",""),FIND(",",B1)+1,255)&LEFT(SUBSTITUTE(B1," ",""),FIND(",",B1)-1)



"sh0t2bts" wrote in message
...
I have some data that I have pulled back from an SQL server that I need to
match but they clearly do not match in computer terms as A = B.

I have two columns that I need to compare

A B
1 "Fred Bloggs" "Bloggs, Fred"


clearly I can not use =if(A1 = B1,"Yes","No")

There is a slight twist as well, when "Fred Bloggs" was entered they might
be 1 or to spaces between the names and the same goes for "Bloggs, Fred"


Can you advise what function or set of functions I would use?

Many Thanks

Mark




  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

Try:

=IF(MATCH("*"&LEFT(A1,FIND(" ",A1)-1)&"*",B1,0)*MATCH
("*"&MID(TRIM(A1),FIND(" ",A1)+1,255)
&"*",B1,0),"Yes","No")

HTH
Jason
Atlanta, GA

-----Original Message-----
I have some data that I have pulled back from an SQL

server that I need to
match but they clearly do not match in computer terms as

A = B.

I have two columns that I need to compare

A B
1 "Fred Bloggs" "Bloggs, Fred"


clearly I can not use =if(A1 = B1,"Yes","No")

There is a slight twist as well, when "Fred Bloggs" was

entered they might
be 1 or to spaces between the names and the same goes

for "Bloggs, Fred"


Can you advise what function or set of functions I would

use?

Many Thanks

Mark


.

  #4   Report Post  
sh0t2bts
 
Posts: n/a
Default

Excellant this worked a treat.

Thanks :o)


"sh0t2bts" wrote in message
...
I have some data that I have pulled back from an SQL server that I need to
match but they clearly do not match in computer terms as A = B.

I have two columns that I need to compare

A B
1 "Fred Bloggs" "Bloggs, Fred"


clearly I can not use =if(A1 = B1,"Yes","No")

There is a slight twist as well, when "Fred Bloggs" was entered they might
be 1 or to spaces between the names and the same goes for "Bloggs, Fred"


Can you advise what function or set of functions I would use?

Many Thanks

Mark



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



All times are GMT +1. The time now is 11:27 PM.

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"