Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Counting how many rows since a new value was made

I am trying to figure out how to count automatically how many periods
ago the highest high was made without manually counting represented by
the 5th column. Example: 30.3125 was the highest high 2 days ago based
on a 6 day max represented in the 4th column. The max function is
easy; counting how many rows ago since it was hit is another. If a new
high was just made it starts at zero. By the way, I am trying to build
an aroon indicator for forex trading, and this is part of the process.
Any formulas would be greatly appreciated. Thanx!


Date High Low Highest
High

10/01/98 27.5000 26.2188
10/02/98 28.1250 26.3125
10/05/98 29.0000 26.9062
10/06/98 30.3125 29.1875
10/07/98 29.7500 29.1875
10/08/98 28.5625 26.5938 30.3125 2
10/09/98 29.8125 27.8750 30.3125 3
10/12/98 30.9688 30.2500 30.9688 0
10/13/98 30.5938 29.7500 30.9688 1
10/14/98 31.1250 29.8125 31.1250 0
10/15/98 32.5000 30.4062 32.5000 0
10/16/98 33.8438 32.8438 33.8438 0
10/19/98 34.4688 33.8125 34.4688 0
10/20/98 34.7188 32.6875 34.7188 0
10/21/98 33.0312 32.2812 34.7188 1
10/22/98 33.6250 32.2812 34.7188 2
10/23/98 34.0000 32.9375 34.7188 3
10/26/98 33.8125 32.6875 34.7188 4
10/27/98 33.1562 31.5000 34.7188 5
10/28/98 32.9688 31.3750 34.0000 3
10/29/98 33.8125 32.6562 34.0000 4
10/30/98 34.7188 33.7188 34.7188 0

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Counting how many rows since a new value was made

If you mean highest for the last six entries then with the headers in Row 1
ans the data in A2:C23 try;

Highest (in D7): =INDEX(B2:B7,MATCH(MAX(B2:B7),B2:B7,0))

No of entries ago (in E7): =6-MATCH(F7,B2:B7,0)

and copy both formulas down

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"rhhince" wrote in message
ups.com...
I am trying to figure out how to count automatically how many periods
ago the highest high was made without manually counting represented by
the 5th column. Example: 30.3125 was the highest high 2 days ago based
on a 6 day max represented in the 4th column. The max function is
easy; counting how many rows ago since it was hit is another. If a new
high was just made it starts at zero. By the way, I am trying to build
an aroon indicator for forex trading, and this is part of the process.
Any formulas would be greatly appreciated. Thanx!


Date High Low Highest
High

10/01/98 27.5000 26.2188
10/02/98 28.1250 26.3125
10/05/98 29.0000 26.9062
10/06/98 30.3125 29.1875
10/07/98 29.7500 29.1875
10/08/98 28.5625 26.5938 30.3125 2
10/09/98 29.8125 27.8750 30.3125 3
10/12/98 30.9688 30.2500 30.9688 0
10/13/98 30.5938 29.7500 30.9688 1
10/14/98 31.1250 29.8125 31.1250 0
10/15/98 32.5000 30.4062 32.5000 0
10/16/98 33.8438 32.8438 33.8438 0
10/19/98 34.4688 33.8125 34.4688 0
10/20/98 34.7188 32.6875 34.7188 0
10/21/98 33.0312 32.2812 34.7188 1
10/22/98 33.6250 32.2812 34.7188 2
10/23/98 34.0000 32.9375 34.7188 3
10/26/98 33.8125 32.6875 34.7188 4
10/27/98 33.1562 31.5000 34.7188 5
10/28/98 32.9688 31.3750 34.0000 3
10/29/98 33.8125 32.6562 34.0000 4
10/30/98 34.7188 33.7188 34.7188 0



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
Counting certian rows to sum them T5s Excel Worksheet Functions 5 January 12th 07 07:33 AM
Counting Rows CLamar Excel Discussion (Misc queries) 1 June 15th 06 04:05 PM
counting rows across multiple worksheets Aleks Excel Discussion (Misc queries) 1 October 29th 05 02:56 AM
cells() and counting number or rows on spreadsheet HeatherO Excel Worksheet Functions 7 March 2nd 05 10:36 AM
Display specific rows from table on other worksheet Bruno G. Excel Discussion (Misc queries) 2 January 20th 05 11:22 PM


All times are GMT +1. The time now is 01:12 PM.

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

About Us

"It's about Microsoft Excel"