#1   Report Post  
Chewy
 
Posts: n/a
Default Compare two columns

Hello,

I have two columns in the same sheet which contain cells with identical
results. I want to delete any result that is the same in both columns. Any
suggestions?

Column A Column B
abc jkl
def abc
ghi mno

Want to write a function to delete abc

Thanks.
  #2   Report Post  
Art
 
Posts: n/a
Default

This might not be what you're looking for, but:

You can put a "conditional format" in each column, that would check for the
presence of an item in the other column. This would then change the
highlighting or color, thus allowing you to see the duplicated items.

So, working in columns column A and B as in your example. Highlight column
A. Select Format, Conditional Formatting. Change Condition1 from "Cell
Value Is" to "Formula Is".

In the formula box, type: =COUNTIF($A:$A,B1)0. Then pick a format you'd
like to use for this.

Now, if you want to delete items from both columns, be careful. As soon as
you delete the item from one column, the formatting in the other column will
go back to normal. One way to deal with this would be to turn off automatic
calculations.

Art


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
Excel Compare values in columns & display missing values in a new cpetta Excel Discussion (Misc queries) 1 April 2nd 05 05:51 AM
how do I compare columns in two different workbooks? Provider98122 Excel Discussion (Misc queries) 5 March 10th 05 03:33 AM
How do I compare two columns on seperate sheets and replace text . hag400 Excel Worksheet Functions 1 December 28th 04 02:32 PM
Compare Columns Michael Nesi Excel Discussion (Misc queries) 1 December 6th 04 08:45 PM
compare columns of different worksheets Classic Excel Discussion (Misc queries) 2 December 2nd 04 10:09 PM


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