DelShannon
Instructor
HI there,
I have a spreadsheet with sequential dates in column A and corresponding prices in column B. I would like to copy consective sets of n days into column c and do analyses on them, in a loop. I am trying to write code that asks a user how many days to put into this "window" for analysis.
For example, The user chooses 10 days at a time. The code selects a2:a11 and copies the offset data in column B to c1. Then averages, etc are taken and placed elsewhere on the spread sheet. The code then loops to take the next 10 days (a12:a21 and so on until the data is exhausted (about 5000 days later).
I can't figure out how to grab the user specified range and repeatedly do so down the column.
Any help would be greatly appreciated.
Cheers,
Delberte
I have a spreadsheet with sequential dates in column A and corresponding prices in column B. I would like to copy consective sets of n days into column c and do analyses on them, in a loop. I am trying to write code that asks a user how many days to put into this "window" for analysis.
For example, The user chooses 10 days at a time. The code selects a2:a11 and copies the offset data in column B to c1. Then averages, etc are taken and placed elsewhere on the spread sheet. The code then loops to take the next 10 days (a12:a21 and so on until the data is exhausted (about 5000 days later).
I can't figure out how to grab the user specified range and repeatedly do so down the column.
Any help would be greatly appreciated.
Cheers,
Delberte