Repeat formula in column H until the last row with data in column G

matteobusetti

New Member
Joined
Aug 23, 2015
Messages
6
Hi everyone!

I am trying to automate an excel file for stock trading. What I have done so far is that I created a macro that let me select the name of the stock, the start date, the end date, the frequency of the data and fetches all the data from yahoo finance.

However, I would like to automate also the next steps, but I am struggling to find a solution.

In column H I have a formula to calculate the returns for the day and I would like this formula to automatically get updated when the macro fetches data for a new stock, which might have a different time span and therefore more (or less) rows of data.

I would really appreciate if someone has a solution for this!
Thank you!
 

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