Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Comparing 2 lists of data that needs exact matches and duplicates only act as 1

ID: 3565005 • Letter: C

Question

Comparing 2 lists of data that needs exact matches and duplicates only act as 1 duplicate not many

This is my table not what i am wanting to do is quite difficult to explain so please bare with me.

the first column which is column A is a list of expected numbers that I need. Column B is what I have I need to compare these 2 list for missing numbers because this list may contain hundreds of numbers and some may be duplicates of both columns which makes this difficult.

What I need is a formula or several to compare each list A with list B and find out what I am missing but every formula I use if i enter the number 137574 in to column B in a condition format or a vlookup formlua shows that i have all of the numbers from column B but as you can see from the table I only have 2 not the 3 that are required.

So basically or not so basically ?what I need from the formula is uusing the table above either output to column A or adding another column C and find out that I am missing number one of 137574 aand 754628 in any way possible whether it be highlightted red in column A or adding the missing nuumbers to colum C.

Any help would be appreciated thank you in advance

117465 117465 137574 137574 137574 137574 137574 145637 145637 147846 147846 175485 175485 475632 475632 748659 748659 754628

Explanation / Answer

Try this macro:

Sub CompareLists()
    Dim r1 As Long
    Dim m1 As Loong
    Dim r2 As Long
    Dim m2 As Long
    m1 = Range("A" & Rows.Count).End(xlUp).Row
    Range("A1:A" & m1).Innterior.ColorIndex = xlColorIndexNone
    r1 = 1
    r2 = 1
    Do While Range("A" & r1).Value <> ""
        If Range("B" & r2).Value = Range("A" & r1).Value Then
            r2 = r2 + 1
        Else
            Range("A" & r1).Interior.Coolor = vbYellow
        End If
        r1 = r1 + 1
    Loop
End Subbb

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote