LOOKUP / MATCH - Data Verification Sheet

dinkss

Board Regular
Joined
Aug 25, 2020
Messages
129
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All,

I'm trying to get double verification worksheet created but don't know how to start.
Basically there are 3 tabs:
1. DATA_EXTRACT
2. PERFORMER
3. VERIFIER

DATA_EXTRACT tab will be hidden with all information about products etc and users will not be able to see it.

My question is: How can I do a lookup / match formula in two tabs (PERFORMER & VERIFIER), where PERFORMER tab and VERIFIER tab will have data entered by user to see if it is matching data in hidden sheet (DATA_EXTRACT). If data will be entered incorrectly - will not match what's in DATA_EXTRACT tab, user should get a message - warning that DATA ENTERED IS INCORRECT.

Can you help me build a formula / macro with something like that?

1663163309217.png
 

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.
Can you show us some examples of what the data looks like, and what they will be entering in?
 
Upvote 0
Yes, this is an example, it will be probably 1300 fields

1663180129088.png
 
Upvote 0
DATA_EXTRACT tab will have all information hidden, and PERFORMER & VERIFIER tab, will have only headers - see row 1.

People will have to enter exactly same data, same match what's in DATA-EXTRACT in order to be correct. If they will not enter information correctly, e.g. instead of 1.004 in column Q they will put 1.003, excel should stop them and display error etc.
 
Upvote 0
Are all the sheets matched up EXACTLY, so they have all of the same columns and headers, and in the exact same order?
And will they have all the exact same rows, and in exactly the same order?

So, whatever they enter into cell Q5 on the Performer sheet should exacly match cell Q5 on the "DATA_EXTRACT" sheet?
Or might the rows be in different orders, and we need to match up on the value in column A ("Material")?
 
Upvote 0
Are all the sheets matched up EXACTLY, so they have all of the same columns and headers, and in the exact same order?
And will they have all the exact same rows, and in exactly the same order?

So, whatever they enter into cell Q5 on the Performer sheet should exacly match cell Q5 on the "DATA_EXTRACT" sheet?
Or might the rows be in different orders, and we need to match up on the value in column A ("Material")?
All sheets will have exactly same columns and headers and exact same order. All will have exact same rows and exactly same order for people to enter the data.
 
Upvote 0
OK, if every cell entry must match exactly, try this:
1. Right-click on the "PERFORMER" sheet tab name at the bottom of the screen, select "View Code", and paste this VBA code in the VB Editor window that pops up:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    Dim cell As Range
    Dim ad As String
    
'   Check to see if entry matches DATA_EXTRACT sheet
    For Each cell In Target
'       Get cell address
        ad = cell.Address(0, 0)
'       Compare value to value from same cell on DATA_EXTRACT sheet
'       If not same, clear the value and return message
        If cell.Value <> Sheets("DATA_EXTRACT").Range(ad).Value Then
            Application.EnableEvents = False
            cell.ClearContents
            Application.EnableEvents = True
            MsgBox "Entry in cell " & ad & " has been removed!", vbOKOnly, "DATA ENTERED IS INCORRECT"
        End If
    Next cell
    
End Sub
2. Go to the "VERIFIER" sheet, and repeat step 1 for this sheet.

Now, whenever you make an entry into any cell on the PERFORMER and VERIFIER sheets, it will check it against the DATA_EXTRACT sheet, and remove it if the entry is different, and alert you.
 
Upvote 0
Solution
OK, if every cell entry must match exactly, try this:
1. Right-click on the "PERFORMER" sheet tab name at the bottom of the screen, select "View Code", and paste this VBA code in the VB Editor window that pops up:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    Dim cell As Range
    Dim ad As String
   
'   Check to see if entry matches DATA_EXTRACT sheet
    For Each cell In Target
'       Get cell address
        ad = cell.Address(0, 0)
'       Compare value to value from same cell on DATA_EXTRACT sheet
'       If not same, clear the value and return message
        If cell.Value <> Sheets("DATA_EXTRACT").Range(ad).Value Then
            Application.EnableEvents = False
            cell.ClearContents
            Application.EnableEvents = True
            MsgBox "Entry in cell " & ad & " has been removed!", vbOKOnly, "DATA ENTERED IS INCORRECT"
        End If
    Next cell
   
End Sub
2. Go to the "VERIFIER" sheet, and repeat step 1 for this sheet.

Now, whenever you make an entry into any cell on the PERFORMER and VERIFIER sheets, it will check it against the DATA_EXTRACT sheet, and remove it if the entry is different, and alert you.
Perfect, I will try that, thank you very much
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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