View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default find date that meets a criteria

How about a nice macro?

Sub maxvolatilevalue() 'cols g:i
mr = 0
For i = Cells(Rows.Count, "h").End(xlUp).Row To 7 Step -1
x = Cells(i, "H") - Cells(i, "i")
y = Cells(i - 1, "H") - Cells(i - 1, "i")
If x y And x mr Then mr = i
Next i
MsgBox Cells(mr, "g")
End Sub
--
Don Guillett
SalesAid Software

"TUNGANA KURMA RAJU" wrote in
message ...
i need a function that gives me a date from
col A ---------------Col B-------------------Col C
Date----------------HighValue--------------LowValue
20/NOV/2006-----50.25--------------------48.50
21/NOV/2006-----60------------------------57.25
22/NOV/2006-----55.75--------------------50.25
24/NOV/2006-----52------------------------48
the difference of highvalue and lowvalue is the volatile spread value of
the
day.
I want a function that gives me most(maximum) volatile day from the above
range.
The answer of the above range is 22/NOV/2006.(spread values of above range
are 1.75,2.75,5.50,4.00 and maximum value is 5.50).Thanks any body gives
me a
compact function without creating a helper column to the above range.