Match lists and display pop-up message

llorcs

New Member
Joined
Jun 7, 2016
Messages
9
Dear members!
I would like to ask for some help regarding the following problem:

In my workbook I have two sheets. Sheet 1 contains two columns with data. Sheet 2 contains two columns with a list of words/phrases. I would like to achieve the following: if the data in Sheet 1 differs from the proper phrases in Sheet 2 I would like it to display a pop-up window.
Furthermore, in some cells in Sheet 1 several values are entered and separated by a comma.

I know it is not much and far from what I want to achieve, but here is my code:

Code:
Sub listmatch()
For i = 2 To 2


    If Cells(i, "A") <> Worksheets("Sheet2").Cells(i, "B") Then
    MsgBox "Data 1 Does Not Match"
        End If
        
    For j = 2 To 2
        If Cells(j, "B") <> Worksheets("Sheet2").Cells(j, "C") Then
        MsgBox "Data 2 Does not Match"
            
    End If
    Next j
Next i
End Sub

I am also attaching a sample with data:
https://dl.dropboxusercontent.com/u/62891955/list match.xlsx

Thank you for any input/feedback/help!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,215,375
Messages
6,124,576
Members
449,174
Latest member
chandan4057

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