Find Minimum values in cyclical graph

K

Kramer1557

I hope someone has an idea on how to start this problem.

I have a lot of cyclical data that diminishes over time. I need to
extract the minimum values of each cycle. I was thinking something
along the line of having a start and finish value, and find the minimum
value between the start and finish rows. This would repeat by setting
the finish value to the start variable, and obtaining a new finish
value However, I do not know how to use a variable to select a cell.

If this sounds strange, I'll write a small example

A B
1 5
2 4
3 3
4 4
5 5
6 4
7 3
8 4
9 5

I would initialize start to 1 and finish to 5 (the values in column A).
The program would then calculate the minimum between the two values in
clolumn B. Then finish (5) would become start, and 9 would be the new
finish value.

Any help is greatly appreciated, thanks in advance.

-Taylor
 
T

Tom Ogilvy

Dim i as Long, rng as Range
for i = 1 to 20 step 5
set rng = cells(i,1).Resize(5,1)
msgbox rng.Address & " minimum: " & _
application.Minimum(rng.offset(0,1))
Next
 
K

kounoike

Is application.Minimum() typo of application.Min() ?

i'm not sure but i think step 4 instead of step 5, according to Taylor.

keizi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top