owmyheadimtootall
New Member
- Joined
- Sep 6, 2007
- Messages
- 5
Hi, does anybody know how I could cut rows from a range of data based on a changing value in a column. I have a whole set of data within which column K represents Currency. Currently I have my data sorted by Currency then a line is inserted with every Currency change.
Set up as:
Range("k2").Select
Do Until ActiveCell = Empty And ActiveCell.Offset(1) = Empty
If ActiveCell <> ActiveCell.Offset(1) And ActiveCell <> Empty And ActiveCell.Offset(1) <> Empty Then
ActiveCell.Offset(1).EntireRow.Insert
ActiveCell.Offset(2).Select
Else
ActiveCell.Offset(1).Select
End If
Loop
What I would prefer as the data is now so large is to copy all data below the change in currency to the next sheet as opposed to entering a row. Does anybody know how I could do this?
Thanks,
Adam
Set up as:
Range("k2").Select
Do Until ActiveCell = Empty And ActiveCell.Offset(1) = Empty
If ActiveCell <> ActiveCell.Offset(1) And ActiveCell <> Empty And ActiveCell.Offset(1) <> Empty Then
ActiveCell.Offset(1).EntireRow.Insert
ActiveCell.Offset(2).Select
Else
ActiveCell.Offset(1).Select
End If
Loop
What I would prefer as the data is now so large is to copy all data below the change in currency to the next sheet as opposed to entering a row. Does anybody know how I could do this?
Thanks,
Adam