# Compare cells of two columns excel 2007

Solved/Closed
Baruch - Nov 15, 2010 at 03:27 PM
Rajen - Oct 31, 2013 at 02:10 PM
Hello,

I have two columns with identical cells and I need to find those that are not the same. For example: Column1 Cell1 = "a", Column2 Cell1 = "h". Column1 Cell2 = "h', Column2 Cell2="h", etc. I need to find which two cells are not the same. Thanks for any advice. Baruch.

Related:

## 3 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Nov 15, 2010 at 09:12 PM
in column 3 that is in C1 type or copy this formula

=IF(A1=B1,"same","not same")

copy C1 down.

see what you get.
in row "A" suppose some 1-100 numbers are there in cell, like in "B" some of the numbers only will appear though they are from in between 1 to 100, some numbers will not be there . My question is that the numbers which are not identical in row "A" and "B" should appear in row "c". Pl help
Thanks Venkat
good one
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Sep 18, 2013 at 01:31 AM
quote
buddi - Sep 17, 2013 11:19AM
in row "A" suppose some 1-100 numbers are there in cell, like in "B" some of the numbers only will appear though they are from in between 1 to 100, some numbers will not be there . My question is that the numbers which are not identical in row "A" and "B" should appear in row "c". Pl help
`Sub tests()Dim r As Range, c As Range, cfind As Range, r2 As RangeSet r = Range(Range("A1"), Range("A1").End(xlToRight))Set r2 = Range(Range("A2"), Range("A2").End(xlToRight))Range("A3").EntireRow.DeleteFor Each c In rSet cfind = r2.Cells.Find(what:=c.Value, lookat:=xlWhole)If cfind Is Nothing ThenCells(3, Columns.Count).End(xlToLeft).Offset(0, 1) = cEnd IfNext cEnd Sub`