View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme[_2_] Bernard Liengme[_2_] is offline
external usenet poster
 
Posts: 563
Default Find 2 highest point to form resistance line

I put your data in A1:B5
In E1 I find the maximum with =MAX(A1:A7)
In F1 I find the next maximum that is later in the column than the first
using
=MAX(INDIRECT("A"&MATCH(E1,A1:A7,0)+1&":A7"))

If the Max is the last in the column than E1 and F1 will have the same vlaue
To get "No line" use
=IF(MATCH(E1,A1:A7,0)=7,"No
line",MAX(INDIRECT("A"&MATCH(E1,A1:A7,0)+1&":A7")) )

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Elton Law" wrote in message
...
Dear expert,

Have left a post for finding 2 lowest point for form a support line.
Now, would like to find 2 highest point to form a resistance line.
Data is from an array for formula.

In this case, should choose 91.27 and 87.96 to form resistance line.
Although 89.95 is higher than 87.96, line is forward plotting.

Is it possible?
If the highest in last row, can show "No line".
Thanks

52.35 26-Jan-10
59.87 18-Feb-10
89.95 26-Feb-10
85.41 05-Mar-10
91.27 10-Mar-10
87.96 23-Mar-10
36.69 29-Mar-10