• July 17, 2017
    Announcement: New site design for Microsoft Community

    In July, Microsoft will roll out the first of ongoing site improvements aimed to modernize Microsoft Community and help customers get the most out of their community experience.

    • During the roll out period, you may see the old or new site design depending on your location

    • We expect the roll out to finish by 31 July

    Note: Past private message conversations will not move to the new site design. Please save any private messages you would like to keep.

     Learn more about the upcoming site improvements in this thread.

    Thank you for being part of Microsoft Community!

 
Question
266 views

Comparing two columns to find the differences

Howieem asked on

I have a list of file names in an Excel worksheet, about 350 file names.  I've added many files to this directory, and made a second worksheet with the new file names, so that now I have about 450 file names.  So.....if I put these two lists into the same worksheet, maybe the older list of 350 in column A and the newer list of 450 in column B, I need to compare the two columns and know which names have been added. 

Is there some code out there that can be used to compare data in column A to data in column B, and in some way, define which data is different, maybe in column C? 

1 person had this question

Abuse history


The answered status icon Answer

You could use conditional formatting.

Select the used range in column B. I'll assume that B1 is the active cell within the selection.

On the Home tab of the ribbon, click Conditional Formatting > New Rule...

Select "Use a formula to determine which cells to format".

Enter the following formula:

=ISERROR(MATCH(B1,A:A,0))

Click Format...

Activate the Fill tab and select a suitable color to highlight the cells.

Click OK twice.

Cells in column B that don't have an exact match in column A will be highlighted.

Kind regards, HansV
www.eileenslounge.com
3 people found this helpful

Abuse history


progress