Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default matching columns using text strings!

hi!

i am having text data thru A1:B6

col A ...............col B
john ambrose....ambrose j
edmond c.........c edmon
arthur a............morais p
w peter william..peter
williams john.....w john
ambrose...........rose j

i need to compare the lists and shortlist the rows
having the unmatched columns with some flag in col C.

the criteria is if some text string *minimum with 5 characters*
in either column should be matched with the other column!

thus the result should be as under:

arthur a..................morais p
ambrose.................rose j

hope that explained the things well!

any help pl?

-via135

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default matching columns using text strings!

you could try

=OR(ISNUMBER(SEARCH(MID(B2,ROW(INDIRECT("1:"&LEN(B 2)-4)),5),A2)))
array entered (Cntrl+Shift+Enter) in cell C2 and copy it down.

It won't pick up on the transposition of the first name initial (if that is
the deciding character)

for example:
"c edmo" would not match "edmo c" because only 4 consecutive letters would
match.



"via135 via OfficeKB.com" wrote:

hi!

i am having text data thru A1:B6

col A ...............col B
john ambrose....ambrose j
edmond c.........c edmon
arthur a............morais p
w peter william..peter
williams john.....w john
ambrose...........rose j

i need to compare the lists and shortlist the rows
having the unmatched columns with some flag in col C.

the criteria is if some text string *minimum with 5 characters*
in either column should be matched with the other column!

thus the result should be as under:

arthur a..................morais p
ambrose.................rose j

hope that explained the things well!

any help pl?

-via135

--
Message posted via http://www.officekb.com


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default matching columns using text strings!

BTW spaces are counted as a character. I think the spaces could be removed,
but then

williams john.....w john


would not match. Also, changing the spaces to an "*" (wildcard search)
won't work because then (for example)


ambrose...........rose*
would match


one other possibility you could try is to see if the next to last character
is a space (for both A2 and B2), such as
edmond c ......... c edmo
and move the last two characters to the front so that it becomes
c edmond ......... c edmo
which would then match.

=OR(ISNUMBER(SEARCH(MID(IF(MID(B2,LEN(B2)-1,1)=" ",RIGHT(B2,1)&"
"&LEFT(B2,LEN(B2)-2),B2),ROW(INDIRECT("1:"&LEN(B2)-4)),5),IF(MID(A2,LEN(A2)-1,1)=" ",RIGHT(A2,1)&" "&LEFT(A2,LEN(A2)-2),A2))))

array entered w/Cntrl+Shift+Enter


"JMB" wrote:

you could try

=OR(ISNUMBER(SEARCH(MID(B2,ROW(INDIRECT("1:"&LEN(B 2)-4)),5),A2)))
array entered (Cntrl+Shift+Enter) in cell C2 and copy it down.

It won't pick up on the transposition of the first name initial (if that is
the deciding character)

for example:
"c edmo" would not match "edmo c" because only 4 consecutive letters would
match.



"via135 via OfficeKB.com" wrote:

hi!

i am having text data thru A1:B6

col A ...............col B
john ambrose....ambrose j
edmond c.........c edmon
arthur a............morais p
w peter william..peter
williams john.....w john
ambrose...........rose j

i need to compare the lists and shortlist the rows
having the unmatched columns with some flag in col C.

the criteria is if some text string *minimum with 5 characters*
in either column should be matched with the other column!

thus the result should be as under:

arthur a..................morais p
ambrose.................rose j

hope that explained the things well!

any help pl?

-via135

--
Message posted via http://www.officekb.com


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
TEXT TO COLUMNS WITH LEADING ZEROS Peggy Excel Discussion (Misc queries) 6 April 27th 23 03:45 AM
Text Color Change prompted by different columns NKDodd Excel Worksheet Functions 1 August 15th 06 08:13 PM
Text to Columns from drop down list update Kurgan Excel Discussion (Misc queries) 0 June 21st 05 12:14 PM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM
Text To Columns Mike Excel Worksheet Functions 3 December 31st 04 11:22 PM


All times are GMT +1. The time now is 04:05 PM.

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"