View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Benoit Benoit is offline
external usenet poster
 
Posts: 8
Default Specifying two cnditions or more

Hi,
I have got the following procedure that checks the whether the cells in
LSRatio are filled before making the calculation. I would like to change this
so that I check that ShortPrice AND LongPrice are different from zero and of
the same sign before making the calculation. How do I do this?
i = 0
For Each cell In Range("LSRatio")
i = i + 1
If Not IsEmpty(cell) Then
Range("ShortCumReturn")(i).Value = (Range("ShortPrice")(i).Value /
Range("LongPrice").Cells(1).Value) - 1
Else
Exit For
End If
Next
Thanks!