Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AAH AAH is offline
external usenet poster
 
Posts: 6
Default Comparing Addresses from 2 different Worksheets

I am trying to compare addresses from two different worksheets in a WorkBook.
Worksht one D4:D7379 (Address line 1), E4:E7379 (Address line 2) and
Worksht two C4:C5431 (Address line 1), D4:D7379 (Address line 2). I want to
copy the cells that are not a match to be Highligted with RED.
--
AAH
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Comparing Addresses from 2 different Worksheets

Presume your line: .. C4:C5431
should actually read: .. C4:C7379

One way to set up the comparisons

In Sheet1,
Put in F4, array-enter*:
=IF(COUNTA(D4:E4)=0,"",ISNUMBER(MATCH(1,(Sheet2!C$ 4:C$7379=D4)*(Sheet2!D$4:D$7379=E4),0)))
Copy down as far as required. Col F returns TRUE, FALSE or blank: "",
depending on whether the addresses in cols D & E are found in Sheet2's cols C
& D or otherwise. You could then easily apply autofilter on col F to retrieve
as desired, or apply CF pointing to col F.

*To array-enter means to press CTRL+SHIFT+ENTER to confirm the formula

Repeat likewise for the converse checks in Sheet2 ..

In Sheet2,
Put in say, E4, array-enter:
=IF(COUNTA(C4:D4)=0,"",ISNUMBER(MATCH(1,(Sheet1!D$ 4:D$7379=C4)*(Sheet1!E$4:E$7379=D4),0)))
Copy down as far as required. Col E returns TRUE, FALSE or blank: "",
depending on whether the addresses in cols C & D are found in Sheet1's cols D
& E or otherwise. You could then easily apply autofilter on col E to retrieve
as desired, or apply CF pointing to col E
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"AAH" wrote:
I am trying to compare addresses from two different worksheets in a WorkBook.
Worksht one D4:D7379 (Address line 1), E4:E7379 (Address line 2) and
Worksht two C4:C5431 (Address line 1), D4:D7379 (Address line 2). I want to
copy the cells that are not a match to be Highligted with RED.
--
AAH

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AAH AAH is offline
external usenet poster
 
Posts: 6
Default Comparing Addresses from 2 different Worksheets

Hi Max

Thanks for the help but here is the thing ... Some of the addresses that are
a correct match is giving a FALSE result. I did some checks on the ones that
came out FALSE and noticed that. The only difference in the address ...is
that one is upper case and the other lower (i.e. sheet 2 addresses are all in
upper case) but some of them are match and reflect TRUE so I cannot find the
trend.
--
AAH


"AAH" wrote:

I am trying to compare addresses from two different worksheets in a WorkBook.
Worksht one D4:D7379 (Address line 1), E4:E7379 (Address line 2) and
Worksht two C4:C5431 (Address line 1), D4:D7379 (Address line 2). I want to
copy the cells that are not a match to be Highligted with RED.
--
AAH

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Comparing Addresses from 2 different Worksheets

MATCH is not case sensitive, so case is not an issue. It's more likely that
there are extraneous white spaces here & there in your data which is throwing
the "correct" matching off. TRIM could take care of these and improve the
robustness of matching.

Try it again with TRIM, like this:

In Sheet1's F4, array-entered:
=IF(COUNTA(D4:E4)=0,"",ISNUMBER(MATCH(1,(TRIM(Shee t2!C$4:C$7379)=TRIM(D4))*(TRIM(Sheet2!D$4:D$7379)= TRIM(E4)),0)))

In Sheet2's E4, array-entered:
=IF(COUNTA(C4:D4)=0,"",ISNUMBER(MATCH(1,(TRIM(Shee t1!D$4:D$7379)=TRIM(C4))*(TRIM(Sheet1!E$4:E$7379)= TRIM(D4)),0)))

Btw, please reply directly to my response instead of replying to your own
posting. That's the correct way to carry on discussions in these newsgroups.
Also, take a moment to press the "Yes" button below. Doing so enhances thread
longevity for the general benefit of other readers, and brings nice green
colours up.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"AAH" wrote:
Hi Max

Thanks for the help but here is the thing ... Some of the addresses that are
a correct match is giving a FALSE result. I did some checks on the ones that
came out FALSE and noticed that. The only difference in the address ...is
that one is upper case and the other lower (i.e. sheet 2 addresses are all in
upper case) but some of them are match and reflect TRUE so I cannot find the
trend.
--
AAH


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AAH AAH is offline
external usenet poster
 
Posts: 6
Default Comparing Addresses from 2 different Worksheets

Thanks again I will try it and let you know.
--
AAH


"Max" wrote:

MATCH is not case sensitive, so case is not an issue. It's more likely that
there are extraneous white spaces here & there in your data which is throwing
the "correct" matching off. TRIM could take care of these and improve the
robustness of matching.

Try it again with TRIM, like this:

In Sheet1's F4, array-entered:
=IF(COUNTA(D4:E4)=0,"",ISNUMBER(MATCH(1,(TRIM(Shee t2!C$4:C$7379)=TRIM(D4))*(TRIM(Sheet2!D$4:D$7379)= TRIM(E4)),0)))

In Sheet2's E4, array-entered:
=IF(COUNTA(C4:D4)=0,"",ISNUMBER(MATCH(1,(TRIM(Shee t1!D$4:D$7379)=TRIM(C4))*(TRIM(Sheet1!E$4:E$7379)= TRIM(D4)),0)))

Btw, please reply directly to my response instead of replying to your own
posting. That's the correct way to carry on discussions in these newsgroups.
Also, take a moment to press the "Yes" button below. Doing so enhances thread
longevity for the general benefit of other readers, and brings nice green
colours up.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"AAH" wrote:
Hi Max

Thanks for the help but here is the thing ... Some of the addresses that are
a correct match is giving a FALSE result. I did some checks on the ones that
came out FALSE and noticed that. The only difference in the address ...is
that one is upper case and the other lower (i.e. sheet 2 addresses are all in
upper case) but some of them are match and reflect TRUE so I cannot find the
trend.
--
AAH




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Comparing Addresses from 2 different Worksheets

Welcome
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"AAH" wrote in message
...
Thanks again I will try it and let you know.
--
AAH



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AAH AAH is offline
external usenet poster
 
Posts: 6
Default Comparing Addresses from 2 different Worksheets

Hi Max

I am now getting a "too many arguments for this function" error, then it
highlights the zero at the end of the function.
--
AAH


"Max" wrote:

Welcome
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"AAH" wrote in message
...
Thanks again I will try it and let you know.
--
AAH




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Comparing Addresses from 2 different Worksheets

Try copying the formulas directly from my response and paste directly into
the formula bar in your sheet, then press CTRL+SHIFT+ENTER to confirm it.

Attached is a sample with the earlier 2 array formulas implemented:
http://www.freefilehosting.net/download/3jeie
AAH.xls

You can copy n paste directly from the sample's formula bar into your actual
sheet's formula bar.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:15,700 Files:353 Subscribers:53
xdemechanik
---
"AAH" wrote in message
...
Hi Max

I am now getting a "too many arguments for this function" error, then it
highlights the zero at the end of the function.
--
AAH



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
Comparing two worksheets David Excel Discussion (Misc queries) 1 February 19th 07 05:12 PM
answer to odd results when comparing hyperlink addresses Patricia Shannon Links and Linking in Excel 0 March 9th 06 07:28 PM
Comparing two Worksheets double__T Excel Worksheet Functions 2 February 17th 06 06:37 AM
Comparing Two Worksheets for changes Jugglertwo Excel Discussion (Misc queries) 1 December 7th 05 08:56 PM
copying addresses from one workbook to another into several worksheets Hans Excel Worksheet Functions 1 July 27th 05 06:10 PM


All times are GMT +1. The time now is 05:41 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"