Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Comparing 2 arrays

Do you know what formula I can use to sort similar items in two arrays
(columns)?
I have a worksheet with 2 columns of numbers. Some of them match, but
some don-t. Is there a way to delete the matching numbers, so I can
only see ones, which don't match?
I would do it by hand, but its hell lot of work :)
Thanks a lot
Nikita

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Comparing 2 arrays

to make it more clear i can show an example of the worksheet.
54 43
43 12
23 45
56 51
21 13
49 90
122 92
134 2
How can i make excel delete number 43 from 1st and 2nd columns?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Comparing 2 arrays

Maybe this will help...

Select Column A.
With A1 the activecell
Format|conditional formatting
formula is:
=countif(b:b,a1)0
make the font color match the fill color (white on white)

Then select column B
and with B1 the activecell
format|conditional formatting
=countif(a:a,b1)0
and apply that same format (white on white)

You'll only see the unique values.

=======================

If you really want to delete those values, then I'd move column B to a new
worksheet.

Then in the first worksheet
in B1
=countif(sheet2!a:a,a1)0
and drag down

In the second sheet:
in B1:
=countif(sheet1!a:a,a1)0
and drag down

Now in each sheet:
select column B
edit|copy
edit|paste special|values
(don't forget the other sheet!)

Now apply Data|filter|autofilter to column B.
Show the True's and delete those visible rows.
Then delete column B
(and same thing for the other worksheet!)

copy the column back to the other sheet if you want. And delete that helper
sheet.

wrote:

to make it more clear i can show an example of the worksheet.
54 43
43 12
23 45
56 51
21 13
49 90
122 92
134 2
How can i make excel delete number 43 from 1st and 2nd columns?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Comparing 2 arrays

thanks a lot Dave. Your solution worked just the way i needed it to.
Thank you and Happy new year

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
Using CORREL with arrays containing null values rmellison Excel Discussion (Misc queries) 1 November 11th 05 03:02 PM
vba adding arrays Jeff Excel Discussion (Misc queries) 1 November 4th 05 02:50 PM
Confused about arrays and ranges in functions Llurker Excel Worksheet Functions 0 July 7th 05 05:44 AM
Comparing Arrays TangentMemory Excel Discussion (Misc queries) 2 May 13th 05 05:06 PM
Comparing Arrays KL Excel Worksheet Functions 9 December 3rd 04 08:58 PM


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