try this
If QualifiedEmployees = 0 Then AverageSalary = 0
else averagesalary= whateveryouwant - you need to define this
If QualifiedEmployees = 0 then
MsgBox "There are no employees who meet all of the criteria. _
Please rerun the macro."
Else
MsgBox "Macros are made more powerful by adding _
VBA statements."
End If
end su
--
duan
-----------------------------------------------------------------------
duane's Profile:
http://www.excelforum.com/member.php...fo&userid=1162
View this thread:
http://www.excelforum.com/showthread.php?threadid=26789