Thread
:
comparing side-by-side lists
View Single Post
#
1
Posted to microsoft.public.excel.programming
Gerencsér Gábor
external usenet poster
Posts: 19
comparing side-by-side lists
Assuming the two columns have no empty cells in the range of interest, the
following should work, by marking the 'lonely' cells red in ColA.
This works with numbers only, not with strings.
Sub MarkMissed()
Range("A1").Select
Do Until ActiveCell = Empty
arow = ActiveCell.Row
Match = False
Do Until ActiveCell.Offset(1 - arow, 1) = Empty
If ActiveCell.Offset(1 - arow, 1) = ActiveCell Then
Match = True
Else
End If
arow = arow - 1
Loop
If Match = False Then
Selection.Interior.ColorIndex = 3
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Cheers, Gabor
"petevang" az
alábbiakat írta a következő hírüzenetben:
...
I have two lists only containing numbers in columns A and B. How can I
see which cells are not in Column B that are in Column A? For
Example:
Cloumn A Column B
1 1
2 2
3 4
4 6
5 7
6 8
7 9
8
9
10
Is there a way that I can have excel return the missing values from
column B (3,5,10)
Thanks
--
petevang
------------------------------------------------------------------------
petevang's Profile:
http://www.excelforum.com/member.php...o&userid=25034
View this thread:
http://www.excelforum.com/showthread...hreadid=530926
Reply With Quote
Gerencsér Gábor
View Public Profile
Find all posts by Gerencsér Gábor