dantheman9
Board Regular
- Joined
- Feb 5, 2011
- Messages
- 175
Hi Im using the below code to copy some data into a table.
see below;
I need to set x by looking in the row above and finding a set value (call it splitno), and then set the end of range as an offset to the same value on the same row (eg if splitno was set to 1 i need x to be 1 and then need to find the next splitno value of 1 on the same row and offset -1 column).
hope that makes sense?
any ideas on it?
thanks
dan
see below;
Code:
x = 2
Set Rrange = Range(Cells(3, x), Cells(3, x + (k - 1)))
b = numbers
Do Until b = 0
Rrange.Copy
Sheets("TEMPS1").Activate
Range("B65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteAll
x = x + k
Sheets("TEMPS").Activate
Set Rrange = Range(Cells(3, x), Cells(3, x + (k - 1)))
b = b - 1
Loop
I need to set x by looking in the row above and finding a set value (call it splitno), and then set the end of range as an offset to the same value on the same row (eg if splitno was set to 1 i need x to be 1 and then need to find the next splitno value of 1 on the same row and offset -1 column).
hope that makes sense?
any ideas on it?
thanks
dan