Public Sub Add2Cells()
If Range("A1").Value <> "" And .Range("B1").Value <> "" Then
Range("C1").Value = Range("A1").Value + Range("B1").Value
End If
End Sub

Signature
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> hi
>
[quoted text clipped - 6 lines]
> i need only the output if the both the cells have the data will you
> can tell me that
JMB - 01 Mar 2008 15:52 GMT
I think you included an extra period
.Range("B1").Value <> ""
probably s/b
Range("B1").Value <> ""
> Public Sub Add2Cells()
> If Range("A1").Value <> "" And .Range("B1").Value <> "" Then
[quoted text clipped - 12 lines]
> > i need only the output if the both the cells have the data will you
> > can tell me that