STOCKHISTORY function not updating

marshak

Board Regular
Joined
May 28, 2007
Messages
65
Hi all,

I am new to STOCKHISTORY and need some guidance. For some reason, column M is not updating correctly:unsure: (for example, there is no Daily Closing Price for 5/2/2022 and when there is one for 5/3/2022 I will need that to update also). Please help!!

Please let me know what is wrong with the current formula, and please help me correct it.

Thank you so much in advance!!

EDITED_2_034664-01__130090421v1_Apollo Partner - HSR Compliance Template.xlsx
ABCDEFGHIJKLM
1APOLLO GLOBAL MANAGEMENT, INC. (XNYS:APO)
2HSR Equity Tracker5/3/2022
3
4
5
6Market Data
7CIQ TickerAPOLLO GLOBAL MANAGEMENT, INC. (XNYS:APO)
8TickerAPO
9
10$51.95Current PriceHSR Daily Closing Price
11#REF!Shares Owned05/3/2022
12#REF!Position Market Value15/2/2022
1325/1/2022
14#REF!Spend net of sales34/30/2022
1544/29/2022$ 49.76
16#REF!Gross Entry Price54/28/2022$ 52.31
1764/27/2022$ 50.92
18#REF!74/26/2022$ 51.15
1984/25/2022$ 54.39
20Watch Levels94/24/2022
21104/23/2022
22$101.0HSR Threshold114/22/2022$ 53.93
23$49.76Low Price Over 45 Days124/21/2022$ 56.16
24#REF!Pos. value @ low price134/20/2022$ 59.16
25#REF!Remaining Availability144/19/2022$ 58.59
26$51.95Current154/18/2022$ 56.76
27#REF!Additional Shares164/17/2022
28174/16/2022
2910.0%16 Filing Threshold184/15/2022
30#REF!Last Filing Shares194/14/2022$ 57.49
31#REF!Total Shares204/13/2022$ 57.75
32#REF!Current Owned214/12/2022$ 55.51
33#REF!Remaining Shares224/11/2022$ 56.87
34$51.95Last Price234/10/2022
35#REF!Remaining Spend244/9/2022
36254/8/2022$ 57.56
37264/7/2022$ 57.67
38Target Levels274/6/2022$ 59.03
39284/5/2022$ 61.13
409.95%Target Position294/4/2022$ 63.36
41#REF!Last Filing Shares304/3/2022
42#REF!Total Shares314/2/2022
43#REF!Current Owned324/1/2022$ 62.33
44#REF!Remaining Shares333/31/2022$ 61.99
45$51.95Target Price343/30/2022$ 63.04
46#REF!Remaining Spend353/29/2022$ 65.71
47363/28/2022$ 63.21
48#REF!Pro Forma Cost Basis373/27/2022
49#REF!Per Share Cost Basis383/26/2022
50393/25/2022$ 62.50
51403/24/2022$ 63.89
52413/23/2022$ 62.78
53423/22/2022$ 64.68
54Target Levels433/21/2022$ 62.50
55443/20/2022
569.99%Target Position453/19/2022
john doe
Cell Formulas
RangeFormula
D2D2=TODAY()
L11:L56L11=D2-K11:K56
C10C10=H7.PRICE
C11,C14C11=SUM(#REF!)
C12C12=+C11*C10
C16C16=MAX(#REF!)/MAX(#REF!)
C18,C30C18=#REF!
C23C23=MIN(M11:M56)
C24C24=-C23*C11
C25C25=+C22+C24
C26C26=+C10
C27C27=+C25/C26
C31C31=C30*C29
C32C32=-C11
C33,C44C33=SUM(C31:C32)
C34C34=+C10
C35,C42,C46C35=+C33*C34
C41C41=+C30
C43C43=-C11
C45C45=+C10
C48C48=C46-C14
C49C49=C48/C42
K13:K56K13=K12+1
M11:M56M11=IFERROR(STOCKHISTORY($H$7,$L11,,,0,1),"–")
Dynamic array formulas.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
An easier approach is to designate two cells for the start and end dates, and then let the SPILL feature of STOCKHISTORY automatically generate the valid dates when the exchange was open as well as the closing price. Here I'm referencing only the top and bottom of your date range (not all dates in that range are valid). Those two date cells could be moved somewhere just above the listing. The formula is entered just once and allowed to spill down. Since you want most recent first, the STOCKHISTORY function is wrapped in a SORT.
Excel Formula:
=SORT(STOCKHISTORY("XNYS:APO",L56,L11),1,-1)
Then the only issue is extracting the appropriate ticker symbol from your H7 cell. The function accepts only the ticker symbol or the exchange:ticker symbol in double quotes, or a reference to that text. Here is an example:
Book1
QR
4TickerXNYS:APO
5Start3/19/2022
6End5/3/2022
7
8
9
10DateClose
115/2/2022$ 51.92
124/29/2022$ 49.76
134/28/2022$ 52.31
144/27/2022$ 50.92
154/26/2022$ 51.15
164/25/2022$ 54.39
174/22/2022$ 53.93
Sheet1
Cell Formulas
RangeFormula
Q10:R40Q10=SORT(STOCKHISTORY(R4,R5,R6),1,-1)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,137
Members
449,207
Latest member
VictorSiwiide

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