Hi guys.. i know this error has been posted several times but i can't seem to find the solution.
The part highlighted is always the "If cll.Value > ffdhigh.Value Then" part.
As stated in my title what i want is to find the first value in the multidimensional array that is more than a single value.
any input will be very much appreciated.
Code:
Option Explicit
Private Sub CommandButton1_Click()
Dim buysignal As Range
Dim OHLC As Range
Dim ffdhigh As Range
Dim sellsignal As Range
Dim ffdlow As Range
Dim cll As Range
Dim i As Long
i = 1
Sheets("sheet2").Activate
Set OHLC = Range("B" & i & ":" & "E" & i)
Set ffdhigh = Range("I" & i)
Set buysignal = Range("M" & i)
Set cll = Range("B63")
For i = 63 To 150
For Each cll In OHLC
If cll.Value > ffdhigh.Value Then
buysignal.Value = "buy"
Else: buysignal.Value = ""
End If
Exit For
Next
Next i
End Sub
The part highlighted is always the "If cll.Value > ffdhigh.Value Then" part.
As stated in my title what i want is to find the first value in the multidimensional array that is more than a single value.
any input will be very much appreciated.