Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub NoMatch()
Dim rng1 As Range Dim rng2 As Range Dim c1 As Range Dim c2 As Range Dim bFound As Boolean Dim iRow As Integer Dim iCt As Integer 'change ranges to fit data Set rng1 = Sheets("Sheet1").Range("a1:a4") Set rng2 = Sheets("Sheet2").Range("a1:a4") For iCt = 1 To 2 If iCt = 2 Then 'change ranges to fit data Set rng2 = Sheets("Sheet1").Range("a1:a4") Set rng1 = Sheets("Sheet2").Range("a1:a4") End If For Each c1 In rng1 bFound = False For Each c2 In rng2 If c1 = c2 Then bFound = True Exit For End If Next c2 If bFound = False Then iRow = iRow + 1 Sheets("Sheet3").Cells(iRow, 1) = c1 End If Next c1 Next iCt End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Producing an automated list from a large list | Excel Worksheet Functions | |||
Compare 2 columns, and create a list of items that are in both lists | Excel Worksheet Functions | |||
Can I compare 2 lists to combine duplicate entries in new list? | Excel Worksheet Functions | |||
Compare 2 lists and if not on list then delete row | Excel Programming | |||
How do I compare 2 lists and show duplicates as a new list? | Excel Programming |