If-Then-Else resulting in DIV/0 error

  • Thread starter Thread starter scapen
  • Start date Start date
S

scapen

Help Please!! :confused:

I am doing a homework assignment that requires an IF statement to b
included in my macro. My problem is my Average Salary contains
daverage function....so when my Number of Employees equals zero
average salary results in DIV/0 error message. I'm not sure how t
write my If statement to display 0 in the average salary when th
number of employees equals 0. Any help would be appreciated.

Thank you
 
right before you calculate the avg

if emp = 0 then avg = 0

continue with your code
where emp = # of employees and avg = average salar
 

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

Similar Threads

If-Then-Else resulting in DIV/0 error 1
If-Then-Else resulting in DIV/0 error 1
DIV/0 6
Run time error 13, type mismatch 7
#DIV/0! Error 3
Run Time error 13 type mismatch 1
#DIV/0! error 1
Another DIV/0 Error 2

Back
Top