MSFT 365 Price Change For X Number Of Days

Data123

Board Regular
Joined
Feb 15, 2024
Messages
79
Office Version
  1. 365
Platform
  1. Windows
I recently purchased MSFT 365 for access to Excel for stock data and was super impressed with the program and data! Then I tried to create a column header for, "Price % Change X Days" and realized STOCKHISTORY counts weekends and holidays as data days. I read about the WORKDAY solution, but this would not solve the holiday issue. Is there a way to create a formula based on days with data only OR X number of days with data?

Lastly, does one have to create a formula that shows a table with dates and prices or can a formula just show the percentage result for each symbol?
 
I could be wrong, but I think workday is a better option. If I don't worry about holidays right now. Can you edit this formula for (Price Change % 5 days) please;

=LET(sh,STOCKHISTORY(A2,WORKDAY(TODAY(),-7-1,1,TAKE(sh,-1)/TAKE(sh,1)-1)

Mr Excel has a link where he describes this very issue of weekends. His formula has a today()-7-1,1 to combat this issue. Excel STOCKHISTORY Never Falls On Weekend Or Holiday - 2468

You know much more than I, can his formula shown in that video at 3.19 min. be implemented in the =LET(sh,.....formula?
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I could be wrong, but I think workday is a better option. If I don't worry about holidays right now. Can you edit this formula for (Price Change % 5 days) please;

=LET(sh,STOCKHISTORY(A2,WORKDAY(TODAY(),-7-1,1,TAKE(sh,-1)/TAKE(sh,1)-1)

Mr Excel has a link where he describes this very issue of weekends. His formula has a today()-7-1,1 to combat this issue. Excel STOCKHISTORY Never Falls On Weekend Or Holiday - 2468

You know much more than I, can his formula shown in that video at 3.19 min. be implemented in the =LET(sh,.....formula?
 

Attachments

  • Capturee2.JPG
    Capturee2.JPG
    70.5 KB · Views: 7
Upvote 0
No worries that last post I did completed it. Thanks!!!
 
Upvote 0
So, you're good? You may want to post your final formula, and mark it as a solution, so people can find it when searching.
(don't mark mine as the solution, unless it really gave you your answer - I don't think I did.). I just saw you marked it. Mark yours if it is correct.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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