Message Box Based on Multiple Criteria

rodl66

New Member
Joined
Mar 8, 2023
Messages
26
Office Version
  1. 365
Platform
  1. Windows
Please bear with me as I explain what I have going on, thank you.

I have a workbook with multiple tabs:
Master tab includes employee information such as ID, name, a barcode, issue/expiration date, and a revoked column.
I have tabs for each week of the month which have Time In/Time Out, Name and Revoked

The plan for this is the employees have a badge with various bits of info including the barcode that has been generated from the Master spreadsheet. When the employee arrives to the work site, the correct weekly tab is open and the first or next open Name cell is active. When the employee's badge is scanned, it will populate the date and time in or out as well as their name. If an employee has been terminated or their badge has been revoked, the "Revoked" cell in the row with their information has been set to "YES".

Here's where the funky part is that I cannot figure out...

What I want to happen is the badge is scanned, it looks for that barcode on the Master sheet, then checks to see if the Revoked cell is set to "YES", if so, I need a message box to appear informing the person scanning that the worker is not authorized onto the work site and to confiscate the badge. Once this has been done, they click OK and the same empty cell is active since it was not populated by a valid scanned badge.

Master sheet info:
Column A = Employee ID Number
Column B = Employee Name
Column C = Auto-generated code 128 barcode
Column J = Revocation YES or NO

Week 1 Attendance sheet info:
Column A = Time In/ Time Out
Column B = Employee Name
Column C = Badge Revoked

I stand by to clarify anything I've muddled and thank you very much!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I guess I've stumped the gurus or they just don't want to help. :oops:
 
Upvote 0
Here is my master sheet, after being populated, if someone's badge gets revoked, the appropriate employee will have I? marked as YES
ss1.png


When the employee gets to the work site, the next open column B cell will be active, their badge will be scanned and the corresponding column A cell will be populated with the date and time, then B will be populated with their employee number and name. What is needed is as soon as the badge is scanned, it will check the Revoked cell for that particular employee from the Master sheet. If Revoked is set to YES, it will not populate the cells in the weekly sheet, but will instead generate a pop up box stating, "This badge has been revoked! Please confiscate and direct the employee to leave the site"
ss3.png
 
Upvote 0
Well, this has been reassuring. I guess I'll look for help elsewhere.
 
Upvote 0
Please do not mark a post that doesn't contain a solution as the solution. Thanks
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

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