you can also try
 
a1=b1
 
true and false condition.

--- On Thu, 3/12/09, vijender kumar <simplevi...@gmail.com> wrote:

From: vijender kumar <simplevi...@gmail.com>
Subject: $$Excel-Macros$$ Re: Compare two columns!!
To: excel-macros@googlegroups.com
Date: Thursday, March 12, 2009, 2:38 AM



Hi 
 
On reply of your first query please use the below formula for column C for 
finding if A and B column are equal or not.
 
=IF(A1=B1,"0","1")
 
On reply of your second query you simply use the Minus function.
 
=A1-B1
 
If you have any query then pls let me know
 
Regards

 
On 3/10/09, Skanda <skanda.pokkun...@gmail.com> wrote: 

Hi Guys,
  If I need to compare two columns in the same worksheet say column A and 
Column B. If there is a difference between two corresponding cells in A and B 
then result should be '1' in correspoding cell in column C else result should 
be '0'.And the difference between col A andCol B should be displayed in Col D

Also the same scenario if we need to compare two columns in two worksheets how 
is this achieved?

Col A    Col B   Col C     Col D
   5          5       0             0
   7          2       1             5
   4          9       1            -5



Thanks for your help




      
--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to