stock price period high formula

Cory24

New Member
Joined
May 9, 2018
Messages
1
[FONT=&quot]Hi all, first time poster here,[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]I am trying to build a spreadsheet where I can have a list of stocks I am tracking and notify me when a stock makes a new 20 day and 55 day high. I want to link yahoo finance data or google finance data.[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]I found a formula that others said this will work with 52 week highs. I though I could modify this to show new 20 day and 55 day highs. But when I tested this formula on some historical data, I keep getting the #N/A error. Below is the formula[/FONT]
[FONT=&quot]=IFERROR(MAX(INDIRECT("G"&MATCH(A2-365,A:A,0)&":"&"G"&ROW()),0),MAX(INDIRECT("G"&MATCH(A2-365,A:A,1)+1&":"&"G"&ROW()),0))[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]Honestly I'm not the greatest with excel and don't really understand this formula or how to make them.[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]Any help would be much appreciated. [/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]Thanks in advance!!


[/FONT]
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
A
B
C
D
E
F
G
H
I
J
1
DateOpenHighLowClose*Adj Close**VolumeAbove 20Above 55
2
30-Jan-18​
26,198.45​
26,256.99​
26,028.42​
26,076.89​
26,076.89​
448,330,000​
3
29-Jan-18​
26,584.28​
26,608.90​
26,435.34​
26,439.48​
26,439.48​
421,000,000​
4
26-Jan-18​
26,466.74​
26,616.71​
26,425.35​
26,616.71​
26,616.71​
477,780,000​
New highNew high
5
25-Jan-18​
26,313.06​
26,458.25​
26,259.72​
26,392.79​
26,392.79​
401,390,000​
New highNew high
6
24-Jan-18​
26,282.07​
26,392.80​
26,106.94​
26,252.12​
26,252.12​
518,790,000​
New highNew high
7
23-Jan-18​
26,214.87​
26,246.19​
26,143.90​
26,210.81​
26,210.81​
433,490,000​
New highNew high
8
22-Jan-18​
26,025.32​
26,215.23​
25,974.65​
26,214.60​
26,214.60​
431,200,000​
New highNew high
9
19-Jan-18​
25,987.35​
26,071.72​
25,942.83​
26,071.72​
26,071.72​
585,000,000​
10
18-Jan-18​
26,149.55​
26,153.42​
25,947.32​
26,017.81​
26,017.81​
492,780,000​
New highNew high
11
17-Jan-18​
25,910.78​
26,130.45​
25,865.02​
26,115.65​
26,115.65​
522,720,000​
New highNew high
12
16-Jan-18​
25,987.62​
26,086.12​
25,702.99​
25,792.86​
25,792.86​
606,520,000​
New highNew high
13
12-Jan-18​
25,638.39​
25,810.43​
25,633.08​
25,803.19​
25,803.19​
376,390,000​
New highNew high
14
11-Jan-18​
25,398.60​
25,575.42​
25,396.19​
25,574.73​
25,574.73​
346,830,000​
New highNew high
15
10-Jan-18​
25,348.13​
25,404.92​
25,256.99​
25,369.13​
25,369.13​
341,470,000​
16
9-Jan-18​
25,312.05​
25,439.78​
25,308.41​
25,385.80​
25,385.80​
333,490,000​
New highNew high
17
8-Jan-18​
25,308.40​
25,311.99​
25,235.41​
25,283.00​
25,283.00​
341,390,000​
New highNew high
18
5-Jan-18​
25,114.92​
25,299.79​
25,112.01​
25,295.87​
25,295.87​
358,020,000​
New highNew high
19
4-Jan-18​
24,964.86​
25,105.96​
24,963.27​
25,075.13​
25,075.13​
403,280,000​
New highNew high
20
3-Jan-18​
24,850.45​
24,941.92​
24,825.55​
24,922.68​
24,922.68​
456,790,000​
New highNew high
21
2-Jan-18​
24,809.35​
24,864.19​
24,741.70​
24,824.01​
24,824.01​
341,130,000​
22
29-Dec-17​
24,849.63​
24,871.66​
24,719.22​
24,719.22​
24,719.22​
270,760,000​
Sheet: Sheet42

Formula in cell H2:
=IF(C2>MAX(C3:C22),"New high","")

Formula in cell I2:
=IF(C2>MAX(C3:C57),"New high","")

Copy cells and paste to cells below as far as needed.
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,033
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top