Is this Multi-Search Macro Possible?

  • Thread starter Thread starter Cecil
  • Start date Start date
C

Cecil

Hi All,

If it is not the right place for my question, please point me to the correct
newsgroup.

I have a perplexing problem building a macro in excel that I hope someone
can help me solve as follows;

I have a stream of data values in column AB2:AB14516.
And what I would like to do, is to find lowest value in the last highest
group of 13 consecutive values, rather than the first group using Excel VBA.
Then put that value into cell W3 and the address of that group's range into
cell W4.
In addition, Identify the address of the five cells ahead of that group that
was found and put that address into cell W2.
And finally, identify the address of the 22 cells after the group of 13
consecutive high values and put its address into cell W5.

Any help at this point would be greatly appreciated!
Thanks in advance,
CTown
 
Modify to suit

Sub findlowestinblock()
MC = 1' col A
On Error Resume Next
For i = Cells(Rows.Count, MC).End(xlUp).Row To 1 Step -1
mr = Cells(i - 3, MC).Resize(4)
If Application.CountA(mr) = 4 Then
'MsgBox i
'MsgBox Application.Min(mr)
Cells(2, MC + 4) = Application.Min(mr)
Exit For
End If
Next i
End Sub
 
Back
Top