Checking list in 3 sheets

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180
I have 3 sheet, named master sheet, sheet1 and sheet2.

My master sheet contain a full list. sheet1 contain part of the list from master sheet, same as sheet2. I want to make sure list in sheet1 and sheet2 is complete, which it include everything in the master sheet and nothing is mising. How can I do this?

Assume it's column C is all 3 sheets.

Thanks.
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
the idea is to create a macro that will search every records of master sheet from Sheet1 & 2, from there you can identify which records does not exists.
 

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180
Macro is fine for me, as long as I get the result. Will you be able to provide the macro doing this? Thanks.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
based on your input, no. please provide more info ( ie; ranges,column) if possible use html maker to post few samples.
 

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180

ADVERTISEMENT

MasterSheet : column C
a1
a2
a3
b1
b2
b3

Sheet1 : column C
a1
b1

Sheet2 : column B
b2
b3

from the above sample, a2 & a3 is missing, the macro should prompt me about this missing items.

Thanks.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
untested. this code will put missing in columnD of Master sheet.
Code:
Sub test()
Dim i As Long
With Sheets("Master")
    For i = 1 To .Range("c" & Rows.Count).End(xlUp).Row
        With Sheets("Sheet1").Columns("c")
            Set c = .Find(Sheets("Master").Cells(i, "c").Value, , , xlWhole)
                If c Is Nothing Then
                    With Sheets("Sheet2").Columns("c")
                        Set c = .Find(Sheets("Master").Cells(i, "c").Value, , , xlWhole)
                            If c Is Nothing Then
                                Sheets("Master").Cells(i, "d").Value = "Missing"
                            End If
                    End With
                End If
        End With
    Next
End With
End Sub
 

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180
How can I change this part to look for the cell value:

Code:
With Sheets("Sheet1").Columns("c")

The column is a formula.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
try changing
[code
With Sheets("Sheet1").Columns("c")
Set c = .Find(Sheets("Master").Cells(i, "c").Value,,,xlwhole)
[/code]
to
Code:
With Sheets("Sheet1").Columns("c")
            Set c = .Find(Sheets("Master").Cells(i, "c").Value, LookIn:=xlValues)
 

Watch MrExcel Video

Forum statistics

Threads
1,114,095
Messages
5,545,923
Members
410,713
Latest member
TaremyLunsil
Top