Stu Dapples
Active Member
- Joined
- Jan 12, 2009
- Messages
- 252
I am trying to set up a sheet so when the user runs the regression, it will slelect the last 12 records in a specified column, copy them to a "graph driver" sheet and update....
I have got this far which looks like it is working right up to the point where I want to say OK, now go get the data!
<CODE>
Sub Regression_Copy()
'
' Regression_Copy Macro
Dim Start As String
Dim Finish As String
Sheets("Data").Select
Range("E1").Select
Range("E1").End(xlDown).Select
Finish = ActiveCell.Address
ActiveCell.Offset(-12, 0).Select
Start = ActiveCell.Address
Range("Start:Finish").Select
</CODE>
I know it is the range statement at teh end which I have wrong but I cant work out how to tell it use the 2 addresses within the range statement.... Hope that makes some sort of sense, many thanks in advance for your help!
Stu
I have got this far which looks like it is working right up to the point where I want to say OK, now go get the data!
<CODE>
Sub Regression_Copy()
'
' Regression_Copy Macro
Dim Start As String
Dim Finish As String
Sheets("Data").Select
Range("E1").Select
Range("E1").End(xlDown).Select
Finish = ActiveCell.Address
ActiveCell.Offset(-12, 0).Select
Start = ActiveCell.Address
Range("Start:Finish").Select
</CODE>
I know it is the range statement at teh end which I have wrong but I cant work out how to tell it use the 2 addresses within the range statement.... Hope that makes some sort of sense, many thanks in advance for your help!
Stu