Change from prior in a dynamic array

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,648
Office Version
  1. 365
Platform
  1. Windows
Can someone please help me?

I need a dynamic formula to report the change from the prior day's price, provided there is a prior price (or else report a blank). It's probably BYROW or some such function.

BN BAM.xlsx
ABCDE
2Start8/1/2024
3End8/8/2024
4
5
6Brookfield Corporation (XTSE:BN)
7DateCloseChange
88/1/2024$ 65.99
98/2/2024$ 62.87
108/6/2024$ 61.56
118/7/2024$ 59.00
Sheet1
Cell Formulas
RangeFormula
B3B3=TODAY()
C8:D11C8=STOCKHISTORY(C6,B2,B3,0,0)
Dynamic array formulas.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

as I think your stock history gets imported as text, rather than $ values, maybe something like this could help ?
If you do get actual values (as you show in your file) rather than text that looks like $ values imported, then you can remove the text handlers as I did in cells H8/H9 as example.
Its not Dynamic, as you would still need to know the last row of your data, so it means a copy down.

It may help, but also may not be exactly what you are looking for I appreciate.

cheers
Rob

Book1
ABCDEFGHI
1
2Start08/01/2024
3End08/08/2024
4
5
6Brookfield Corporation (XTSE:BN)
7DateCloseChangein case values not text :
808/01/2024$ 65.993.1265.993.12
908/02/2024$ 62.871.3162.87 
1008/06/2024$ 61.562.56
1108/07/2024$ 59.00 
12
13
Sheet1
Cell Formulas
RangeFormula
H8:H9H8=IF(G9>0,G8-G9,"")
E8:E11E8=LET(a,VALUE(MID(D8,3,LEN(D8)-2)),b,IF(D9="",0,VALUE(MID(D9,3,LEN(D9)-2))),IF(b=0,"",a-b))
 
Upvote 0
One way:

Excel Formula:
=LET(d,INDEX(C8#,0,2),VSTACK({""},DROP(d,1)-DROP(d,-1)))
 
Upvote 0
Thanks for helping Rob.

Stockhistory reports the data as values, and it does it as a dynamic array. So that must be why it appears as text instead of values.
 
Upvote 0

Forum statistics

Threads
1,221,522
Messages
6,160,313
Members
451,637
Latest member
hvp2262

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