Assign part of time-series array to SLOPE function

AmateurExcelUser

New Member
Joined
Apr 7, 2014
Messages
14
I have a large time-series array, say, Array (1 to 5000, 1 to 20). Column 1 has an index number starting at 1, column 2 has the incrementing date. Column 10 has a data series and Column 11 has the natural log LN() of Column 10.

For each row (ignoring the first few rows where I test for non-blank data) I want to calculate in Column 12 the SLOPE of all the data in Column 11 up to that point (but not necessarily starting at row 1 if there is invalid or blank data in the early rows).

For example, say that I have tested that the first 20 rows in Column 11 has blank data which I want to ignore. In a loop from n=1 to 5000, say at the point where n is 100:

I want Array (100,12) to be the Slope of all the data from Array (21,11) to Array (100,11)

On the next increment where n = 101, I want Array (101,12) to be the Slope of the all data from Array (21,11) to Array (101,11)

Does anyone know how I can assign the relevant part of my Array to the SLOPE function on a dynamic basis within a loop please? I want to keep all data in arrays and not use worksheets for storing data.

Many thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,564
Messages
6,125,581
Members
449,237
Latest member
Chase S

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