Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tx12345
 
Posts: n/a
Default Calculating Rolling Peak to Valley in a Column


Hi

This is another brain twister (for me)

Let's say I have a column of numbers:

2
3
4 < new high
3
2 < recent low since new high
2
3
5 < new high
6 < new high
5
4
4 < recent low since new high
6
7
9 < new high

etc

As each new high is made, there is the inevitable fall off to a lowest
point since the last high. Is there an efficient way to identify the
peaks, the recent lows off the peak, and then calculate the difference
as the column rolls on down?

Thx

Tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=509006

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default Calculating Rolling Peak to Valley in a Column

This formula entered in B2 and copied down seems to work:

=IF(AND((A3=A4),(A3A2)),"new high",IF(AND((A3<=A4),(A3<A2)),"recent low
since new high",""))

Results a
2
3
4 new high
3
2 recent low since new high
2
3
5
6 new high
5
4 recent low since new high
4
6
7
9 new high

Slightly different than yours, but yours had some inconsistencies.
--
Kevin Vaughn


"tx12345" wrote:


Hi

This is another brain twister (for me)

Let's say I have a column of numbers:

2
3
4 < new high
3
2 < recent low since new high
2
3
5 < new high
6 < new high
5
4
4 < recent low since new high
6
7
9 < new high

etc

As each new high is made, there is the inevitable fall off to a lowest
point since the last high. Is there an efficient way to identify the
peaks, the recent lows off the peak, and then calculate the difference
as the column rolls on down?

Thx

Tx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=509006


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
IF/AND/OR/DATEIF Issue...sorry...long post... EDSTAFF Excel Worksheet Functions 1 November 10th 05 12:28 AM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Sum if is only calculating one column KoriBustard Excel Worksheet Functions 2 October 24th 05 06:02 PM
Calculating totals in a column based on a lookup in another column Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 15th 05 09:52 AM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"