Thread: #VALUE
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default #VALUE

If youi want it in VBA then:

If Range("A1") < "" And Range("A2") < "" Then
Range("B1") = Range("A1").Value - Range("A2").Value
End If






"amirstal" wrote:

A simple formula (let's say B1=A1-A2) returns a value when A1 and A2
have a value in them, but returns an error (#VALUE) when A1 NS a2 are
empty. Is there a way EXCEL can disregard the error/#VALUE and show
nothing ON B1 when A1 and A2 are empty while returning a value on B1
when A1 and A2 do have a value in them?

Thanks,

Amir