Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choose consecutive, user-defined cell ranges

Status
Not open for further replies.

DelShannon

Instructor
Jul 21, 2003
3
CA
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
 
And what have you tried so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top