|
-
Oct 1st, 2003, 02:20 PM
#1
Thread Starter
Fanatic Member
Comparing Lists [RESOLVED]
I have 56 string lists which need to be compared [2 each of 28 types]. One represents an old list and one an updated list. Each list can contain hundreds of items and I am trying to determine ONLY the values of the items in the updated list that are NOT present in the old lists.
Each list is a column in an Excel spreadsheet. Haven't found the right Excel function to fit. Would appreciate any assistance someone might provide.
Last edited by doofusboy; Oct 5th, 2003 at 05:27 AM.
Do canibals not eat clowns because they taste funny? 
-
Oct 5th, 2003, 02:22 AM
#2
Fanatic Member
There may be a complex Excelfunction that fits, but if you are only talking hundreds, this should do the trick. Assuming master list is in column A and new list is Column B, this puts "X" in Column C for each case where item in B is not in A.
VB Code:
For i = 1 To ActiveSheet.Cells.SpecialCells(xlLastCell).Row
If Columns("A:A").Find( _
What:=Range("B" & i).Value, _
After:=Range("A1"), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False) Is Nothing Then
Range("C" & i).Value = "X"
End If
Next i
-
Oct 5th, 2003, 05:26 AM
#3
Thread Starter
Fanatic Member
Hey, thanks for your reply. Looks like good code. Will try iy out. Already solved prob with a short macro that put old values in array, compared new values to array and then wrote unique values to a new list.
Do canibals not eat clowns because they taste funny? 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|