Smart Detection of missing data

RepetitiveLady

New Member
Joined
Jul 16, 2009
Messages
21
Hi everybody,

I need to check and tally 2 different list of products.
Here is an example of it:

<table dir="ltr" border="1" bordercolor="#05ad00" cellpadding="2" cellspacing="1" height="154" width="448"><tbody><tr><td align="center" height="4" width="14%">
Fixed Database
</td><td height="4" width="14%">Daily List
</td></tr><tr><td style="vertical-align: top;">Button A White
</td><td style="vertical-align: top;">Button A White
</td></tr><tr><td style="vertical-align: top;">Button A Black
</td><td style="vertical-align: top;">Button B Pink
</td></tr><tr><td style="vertical-align: top;">Ribbon A White
</td><td style="vertical-align: top;">Ribbon A Black
</td></tr><tr><td style="vertical-align: top;">Ribbon A Black
</td><td style="vertical-align: top;">Thread A White
</td></tr><tr><td style="vertical-align: top;">Thread A White
</td><td style="vertical-align: top;">Cloth A Blue</td></tr><tr><td valign="top">Thread A Black
</td><td valign="top">
</td></tr></tbody></table>
As you can see from the table above, "Button B Pink" and "Cloth A Blue" is not in the Fixed Database list in column A.

Is there any way that i can make it show me which product is not in the Fixed Database? Maybe you can make highlight the product that is in column B but not in column A. Or make it extract the product into column C. Anything will do, as long as i can easily identify which product is missing.

Please do take note, that i do not want to highlight or extract anything from column A that is missing in column B. I only want to highlight or extract product from column B that is missing in column A.

Can anyone help me?

Cheers
- Cassandra -
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Happy with a macro?
Code:
Sub missdat()
Dim a As Range, e As Range
Set a = Range("a1").CurrentRegion
With CreateObject("Scripting.Dictionary")
    For Each e In a.Resize(a.Rows.Count - 1, 1).Offset(1)
        .Item(e.Value) = Empty
    Next
    For Each e In a.Resize(a.Rows.Count - 1, 1).Offset(1, 1)
        If Not IsEmpty(e) And Not .exists(e.Value) Then
            e.Font.Color = vbRed
            e.Offset(, 2) = e.Value
        End If
    Next
End With
End Sub
 
Upvote 0
Non macro placed in column C & copied down.

=IF(ISERROR(MATCH(B1,A:A,0)),"Missing","Listed")
 
Upvote 0
RepetitiveLady,

Excel Workbook
ABC
1Fixed DatabaseDaily List
2Button A WhiteButton A White 
3Button A BlackButton B Pinknot found in column A
4Ribbon A WhiteRibbon A Black
5Ribbon A BlackThread A White
6Thread A WhiteCloth A Bluenot found in column A
7Thread A Black
8
Sheet1



The formula in cell C2 copied down:
=IF(ISNA(MATCH($B2,A:A,0)),"not found in column A","")
 
Upvote 0
Hi,

Thanks everyone for the help.

I don't know about other people, but my personal preference will be the code provided by hiker95.

If i use, macro, i have to run it every time i want the to see the missing data. And that specific macro is affected by capital letter. Example: i have "cloth" in column A, and "CLOTH" in column B, the macro will detect "CLOTH" as missing, highlight it and extract it out.

dscg code is good too. But it show "Listed" when the product in column B is in Column A, this would be messy. It is good, but not my preferred style.

But at the end, i would like to thank everyone for helping out. Really appreciate it.

Thanks you so much.

Cheers
- Cassandra - :)
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,977
Members
452,540
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top