ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If-Then-Else resulting in DIV/0 error (https://www.excelbanter.com/excel-programming/313069-if-then-else-resulting-div-0-error.html)

scapen[_5_]

If-Then-Else resulting in DIV/0 error
 

You are correct I have =daverage(a,b,c) in my worksheet - I tried what
you suggested and I'm getting compiled errors and end statement
errors....your advice is really good it's just for some dumb reason I
cannot get this straight in my head - I'm hitting nothing but road
blocks. If I could see and example of how it is written that would
help...do you know of any sites I could go to? Again, I'm sorry I am
very frustrated with this and I don't know what to do. Normally I am
really good with computer programs - THANK YOU for all your advice!


--
scapen
------------------------------------------------------------------------
scapen's Profile: http://www.excelforum.com/member.php...o&userid=15156
View this thread: http://www.excelforum.com/showthread...hreadid=267893


Tom Ogilvy

If-Then-Else resulting in DIV/0 error
 
I'm getting compiled errors and end statement
errors


the suggestion by Duane had nothing to do with VBA code and wouldn't work
anyway. (count doesn't do conditional count although perhaps he meant
dCount)

if you have in a cell the formula =dAverage(a,b,c)

then to have that show 0 when no employees meet the criteria

=If(dCount(a,b,c)=0,0,dAverage(a,b,c))

Again, this has nothing to do with VBA. This formula replaces the current
formula in your worksheet.

--
Regards,
Tom Ogilvy

"scapen" wrote in message
...

You are correct I have =daverage(a,b,c) in my worksheet - I tried what
you suggested and I'm getting compiled errors and end statement
errors....your advice is really good it's just for some dumb reason I
cannot get this straight in my head - I'm hitting nothing but road
blocks. If I could see and example of how it is written that would
help...do you know of any sites I could go to? Again, I'm sorry I am
very frustrated with this and I don't know what to do. Normally I am
really good with computer programs - THANK YOU for all your advice!


--
scapen
------------------------------------------------------------------------
scapen's Profile:

http://www.excelforum.com/member.php...o&userid=15156
View this thread: http://www.excelforum.com/showthread...hreadid=267893





All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com