ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   running maximum (newbie question) (https://www.excelbanter.com/excel-discussion-misc-queries/89765-running-maximum-newbie-question.html)

[email protected]

running maximum (newbie question)
 
Will someone please help with the following question:

I have a column of say 200 values.

In row J I want the highest value that has occurred in rows 1, 2,3...
up to J.

I assume the answer for the minimum value would be similar.

Thanks.


Don Guillett

running maximum (newbie question)
 
Please clarify your question.
J is NOT a row.
What range do you want.
Look at the MAX function and the MIN function in HELP


--
Don Guillett
SalesAid Software

wrote in message
ups.com...
Will someone please help with the following question:

I have a column of say 200 values.

In row J I want the highest value that has occurred in rows 1, 2,3...
up to J.

I assume the answer for the minimum value would be similar.

Thanks.




David Biddulph

running maximum (newbie question)
 
wrote in message
ups.com...
Will someone please help with the following question:

I have a column of say 200 values.

In row J I want the highest value that has occurred in rows 1, 2,3...
up to J.

I assume the answer for the minimum value would be similar.


In row 1, you need the formula =MAX(A$1:A1) [assuming that your data values
are in column A], and copy this down in rows 2 to 200.
As you say, MIN() would work similarly.
--
David Biddulph



[email protected]

running maximum (newbie question)
 

David Biddulph wrote:
wrote in message
ups.com...
Will someone please help with the following question:

I have a column of say 200 values.

In row J I want the highest value that has occurred in rows 1, 2,3...
up to J.

I assume the answer for the minimum value would be similar.


In row 1, you need the formula =MAX(A$1:A1) [assuming that your data values
are in column A], and copy this down in rows 2 to 200.
As you say, MIN() would work similarly.
--
David Biddulph


Thank you so much.


[email protected]

running maximum (newbie question)
 

Don Guillett wrote:
Please clarify your question.
J is NOT a row.
What range do you want.
Look at the MAX function and the MIN function in HELP


--
Don Guillett
SalesAid Software

wrote in message
ups.com...
Will someone please help with the following question:

I have a column of say 200 values.

In row J I want the highest value that has occurred in rows 1, 2,3...
up to J.

I assume the answer for the minimum value would be similar.

Thanks.


I got the help I needed. To be more precise I have items
A(1),A(2),...A(200)

I want to set up column B in which

B(J) = MAX((A(1),A(2),...A(J)) for J=1,2,....200.

Since I have the basic answer, I think with some experimentation I can
figure out how to restrict the range to fewer entries (J,J-1,...J-k+1))
instead of going all the way back to cell 1.


[email protected]

running maximum (newbie question)
 
wrote:
I got the help I needed. To be more precise I have items
A(1),A(2),...A(200)[.] I want to set up column B in which
B(J) = MAX((A(1),A(2),...A(J)) for J=1,2,....200.
Since I have the basic answer, I think with some experimentation
I can figure out how to restrict the range to fewer entries (J,J-1,...J-k+1))
instead of going all the way back to cell 1.


I do not see any answer remotely resembling what I think you
want. As I understand you now, you want the maximum of a
range, where the at least the beginning and ending row numbers
are variable. I think the following best fits your needs ....

If column A contains the list of values, and B1 and B2 contain
the beginning and ending row numbers, then:

=MAX(OFFSET($A$1,B1-1,0):OFFSET($A$1,B2-1,0))

produces the maximum value in cells A(B1) through A(B2),
written loosely as you did above.

The same paradigm would also permit you so select a variable
column range as well. Also, OFFSET() can be self-referencial.
For example, if the MAX() formula is in C1, the following gives
the same result:

=MAX(OFFSET(C1,B1-1,-2):OFFSET(C1,B2-1,-2))

HTH.


[email protected]

running maximum (newbie question)
 

wrote:
wrote:
I got the help I needed. To be more precise I have items
A(1),A(2),...A(200)[.] I want to set up column B in which
B(J) = MAX((A(1),A(2),...A(J)) for J=1,2,....200.
Since I have the basic answer, I think with some experimentation
I can figure out how to restrict the range to fewer entries (J,J-1,...J-k+1))
instead of going all the way back to cell 1.


I do not see any answer remotely resembling what I think you
want. As I understand you now, you want the maximum of a
range, where the at least the beginning and ending row numbers
are variable. I think the following best fits your needs ....

If column A contains the list of values, and B1 and B2 contain
the beginning and ending row numbers, then:

=MAX(OFFSET($A$1,B1-1,0):OFFSET($A$1,B2-1,0))

produces the maximum value in cells A(B1) through A(B2),
written loosely as you did above.

The same paradigm would also permit you so select a variable
column range as well. Also, OFFSET() can be self-referencial.
For example, if the MAX() formula is in C1, the following gives
the same result:

=MAX(OFFSET(C1,B1-1,-2):OFFSET(C1,B2-1,-2))

HTH.


I saved your post. Thanks - I'll try it out later - for now I'm just
using the max running all the way back to cell 1 using the method
pointed out by another poster.


[email protected]

running maximum (newbie question)
 
wrote:
wrote:
wrote:
I got the help I needed. To be more precise I have items
A(1),A(2),...A(200)[.] I want to set up column B in which
B(J) = MAX((A(1),A(2),...A(J)) for J=1,2,....200.

[....]
I saved your post. Thanks - I'll try it out later - for now I'm just
using the max running all the way back to cell 1 using the method
pointed out by another poster.


I beg your pardon. The other poster's response is indeed exactly
what you asked for in your second explanation quoted above. My
mistake!



All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com