Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default find differences between two columns

Hi,

Can anyone show me how to find differences between two columns ie..
Col A Col B
100 100
106 108
2500 2500
2999 2999

106 is not in Col B and 108 is not in Col A.
can it be done using a function? ,could you also show me code to do this?

Thanks in advance ,
David


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default find differences between two columns

Hello David,

Have a go with the following code:

Sub CheckTheDifference()
Dim iRow As Integer
Dim iCol As Integer
Dim x As Integer

iRow = ActiveCell.Row
iCol = ActiveCell.Column

For x = 0 To 10
If Cells(iRow + x, iCol).Value < Cells(iRow + x, iCol + 1).Value
Then
MsgBox "The cells on row " & iRow + x & " do not match"
End If
Next x

End Sub

Hope that helps.

Best regards

John


"David Kennedy" wrote in message
...
Hi,

Can anyone show me how to find differences between two columns ie..
Col A Col B
100 100
106 108
2500 2500
2999 2999

106 is not in Col B and 108 is not in Col A.
can it be done using a function? ,could you also show me code to do this?

Thanks in advance ,
David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default find differences between two columns


From comp.apps.spreadsheets on Jan 26, 2001 by Loren Anderson...
Given 2 lists of words
1. Select column B (click the letter B)
2. Choose Format Conditional formatting
3. In ""Condition 1"" choose ""Formula is""
4. Enter this formula =(COUNTIF($A:$A,B1)=0)*(B1<"")
5. Click the ""Formats"" button and take your pick. OK.OK.
Now every name in B not in A will light up.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"David Kennedy"
wrote in message
...
Hi,
Can anyone show me how to find differences between two columns ie..
Col A Col B
100 100
106 108
2500 2500
2999 2999

106 is not in Col B and 108 is not in Col A.
can it be done using a function? ,could you also show me code to do this?
Thanks in advance ,
David


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
Differences between columns Richard Excel Worksheet Functions 3 April 28th 09 01:04 PM
Find the differences in 2 columns Bec[_2_] Excel Discussion (Misc queries) 2 April 5th 07 01:34 PM
find all the possible differences equals to 3 Jason Excel Worksheet Functions 7 January 24th 07 09:37 PM
How do I find the differences in two spreadsheets ritalc Excel Discussion (Misc queries) 0 February 15th 06 04:31 PM
Differences between two columns. Mr. Smiley Excel Discussion (Misc queries) 4 September 20th 05 12:32 AM


All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"