Thread: Macro erro
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
orquidea orquidea is offline
external usenet poster
 
Posts: 132
Default Macro erro

Thanks a lot for your help. It worked.

Orquidea
"FSt1" wrote:

hi
you could wrap it in an if statement to test for zero.
if our20/total20< 0 then
per=(our20/total20)
end if
or....
if our20/total20= 0 then
do something else
else
per=(our20/total20)
end if

my thoughts
Regards
FSt1
"orquidea" wrote:

Hi

I have the following subprocedure
Per=(our20/total20)
Some times the variables our20 and total20 will be =0. In these situations,
I am getting the message "Run-time error'6' overflow" . The subprocedure
above is highlighted. I believe it is because the division is 0/0.

Could anyone help me to solve this problem?

Thanks,
Orquidea