View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Arvind Mane Arvind Mane is offline
external usenet poster
 
Posts: 5
Default can anyone help me for "#DIV/0!" Error

i am doing some caculations in excel cells, my result is in cell A1,
if the result comes "#DIV/0!" then While executing the following macro, VBA
gives me Debug message. The value of A becomes "Error 2007".
How can i solve this problem?


Sub Postmacro()
A = Cells(1, 1).Value
B = 1.5
if(A<0) then
C = B / A
End if
End Sub