If-Then-Else resulting in DIV/0 error

S

scapen

Well, if anyone is interested here's my file: It's the button lable
search for all employees by city,title,service,and salary that I a
having problems with....thanks again for everyone's help
 
D

duane

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top