In the attached Xls file, column “B” represent the number of employees pertain to each Department in column “A”.
As per file instruction, the end user will have to highlight the 3 Departments that have the highest (or lowest) number of employees.
I want the macro to check if the end user did this or not and promote him with a message if he did not.
I know only parts of the required codes and I would appreciate any help to complete it. Thanks.
Code:
With Selection.Pattern
Pattern = xlNone ‘this mean it is not highlighted in any color
Call MsgBox("you have not 3 Departments that have the highest number of employees – Pls try again", vbOKOnly, "WARNING")