Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If-Then-Else resulting in DIV/0 error


Help Please!!

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

--
scape
-----------------------------------------------------------------------
scapen's Profile: http://www.excelforum.com/member.php...fo&userid=1515
View this thread: http://www.excelforum.com/showthread.php?threadid=26789

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If-Then-Else resulting in DIV/0 error


right before you calculate the avg

if emp = 0 then avg = 0

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

--
duan
-----------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...fo&userid=1162
View this thread: http://www.excelforum.com/showthread.php?threadid=26789

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If-Then-Else resulting in DIV/0 error


You attached no file.

--
Regards,
Tom Ogilv

--
Tom Ogilv
-----------------------------------------------------------------------
Tom Ogilvy's Profile: http://www.excelforum.com/member.php...nfo&userid=196
View this thread: http://www.excelforum.com/showthread.php?threadid=26789

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup resulting in #N/A bubbles Excel Discussion (Misc queries) 2 June 20th 09 12:00 AM
Negative Values resulting in error KKD Excel Discussion (Misc queries) 6 June 1st 09 09:19 PM
WORKDAY resulting in #VALUE error Joseph Excel Worksheet Functions 4 April 20th 08 11:10 PM
Calculations resulting in #DIV/0! Debbie Excel Worksheet Functions 6 February 25th 08 10:31 PM
Dll error resulting from "CreateWorkspace" [email protected] Excel Programming 0 June 9th 04 09:26 AM


All times are GMT +1. The time now is 11:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"