I am extremely sorry. I have made corrections, I hope that the post now complies with the rules.
Is there a way that using the code that ravishankar provided can have the script simply make note if a name is present on one list and not on another.
For example, if the name jimbob was present on the first worksheet and not present on the second worksheet. Instead of the program spitting out an error and stopping. Is there a way to make the program simply make a note in sheet c and then go on?
Sub List()
Dim x As Long, y As Long, d As Long, a As Long
Sheets("a").Select
Sheets("c").Range("A:C").ClearContents
d = 2
x = Sheets("A").Range("A" & Rows.Count).End(xlUp).Row
y = Sheets("B").Range("A" & Rows.Count).End(xlUp).Row
MsgBox x & y
For a = 2 To x
Sheets("A").Cells(1, 26) = "=match(A" & a & ",B!A1:A" & y & ",0)"
Sheets("A").Cells(1, 27) = "=iserror(z1)"
If Sheets("A").Cells(1, 27) = False Then
c = Sheets("A").Cells(1, 26)
If Abs(B!Cells(c, 2)) > 0.9 And Abs(a!Cells(a, 2)) > 0.9 Then
Sheets("C").Cells(d, 1) = Sheets("A").Cells(a, 1)
Sheets("C").Cells(d, 2) = Sheets("A").Cells(a, 2)
Sheets("C").Cells(d, 3) = Sheets("B").Cells(, 2)
d = d + 1
End If
End If
Next a
Sheets("A").Range("Z1:AA1").ClearContents
MsgBox "Complete"
End Sub
Sub compare()
Dim x As Long, y As Long, d As Long, a As Long
Sheets("c").Range("A:C").ClearContents
Sheets("B").Select
d = 2
x = Sheets("A").Range("A" & Rows.Count).End(xlUp).Row
y = Sheets("B").Range("A" & Rows.Count).End(xlUp).Row
For a = 1 To y
Sheets("B").Cells(a, 3) = "=Vlookup(A" & a & ",A!A1:B" & x & ",2,false)"
If Abs(Sheets("B").Cells(a, 3)) > 0.9 And Abs(Sheets("B").Cells(a, 2)) > 0.9 Then
Sheets("C").Cells(d, 1) = Sheets("B").Cells(a, 1)
Sheets("C").Cells(d, 2) = Sheets("B").Cells(a, 2)
Sheets("C").Cells(d, 3) = Sheets("B").Cells(a, 3)
d = d + 1
End If
Next a
Sheets("A").Range("Z1:AA1").ClearContents
MsgBox "Complete"
End Sub
re-uploaded sheet with some names and values that appear on one sheet but not on the other.
thank you again to anyone who helps. Even a pointer in the right direction is helpful
thank you
Bookmarks