View Single Post
 
Old 04-16-2012, 03:56 AM
ibrahimaa ibrahimaa is offline Windows Vista Office 2007
Advanced Beginner
 
Join Date: May 2011
Posts: 35
ibrahimaa is on a distinguished road
Default Highest & lowest Numbers

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")  
Attached Files
File Type: xlsx Highest & lowest Number.xlsx (9.1 KB, 12 views)
Reply With Quote