ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   comparing two columns (https://www.excelbanter.com/excel-discussion-misc-queries/249627-comparing-two-columns.html)

lputnam

comparing two columns
 
I need to compare cells 2 columns and return a value if different.
e.g.
A1: 2002 B:2002
A2: 2002 B:2003
A3: 2002 B:2002

Need to identify row 2 is different (with an x and a color?) I have about
1000 rows to compare.
I tried some of the formulas listed in this section e.g.
=if(countif(a:a,a25)1,a25,"")
but didn't return what i wanted.

Ms-Exl-Learner

comparing two columns
 
Paste this formula in C1 cell
=IF(A1=B1,"Both Are Same","Mismatch")
Now copy the C1 cell and paste it to the remaining cells of C Column depends
upon your A & B Column Data.

For Applying the Conditional Formatting
Place the Cursor in A1 cell and hit Cntrl+Spacebar now the Total A Column
will be selected and extend your selection to B Column by holding Shift +
Right Arrow and you can notice that the A1 will have the White Background
after selection also.

Now goto FormatConditional FormattingFormula Is Paste the below formula
=$A1<$B1
Click Format and set the desired Font colour and background as per your
desired give Ok and Hit Ok once Again. Thats It!

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"lputnam" wrote:

I need to compare cells 2 columns and return a value if different.
e.g.
A1: 2002 B:2002
A2: 2002 B:2003
A3: 2002 B:2002

Need to identify row 2 is different (with an x and a color?) I have about
1000 rows to compare.
I tried some of the formulas listed in this section e.g.
=if(countif(a:a,a25)1,a25,"")
but didn't return what i wanted.


David Biddulph[_2_]

comparing two columns
 
Conditional Formatting/ Formula is: =A1<B1
Set your desired format

Or (to format cell B1), Conditional Formatting/ Cell value is/ Not equal to:
=A1
--
David Biddulph


"lputnam" wrote in message
...
I need to compare cells 2 columns and return a value if different.
e.g.
A1: 2002 B:2002
A2: 2002 B:2003
A3: 2002 B:2002

Need to identify row 2 is different (with an x and a color?) I have about
1000 rows to compare.
I tried some of the formulas listed in this section e.g.
=if(countif(a:a,a25)1,a25,"")
but didn't return what i wanted.





All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com