|
-
May 27th, 2004, 04:01 AM
#1
Thread Starter
New Member
Cut operation in Excel macro
Hi there!
I got this Subroutine of an excel macro. And it basically started to delete rows that were present more than one time in a sheet. Though now I don't want to delete them, I want to cut them to a different sheet in my excel file. How can I do this?
Here's the code I got so far;
Sub Delete_doubles()
last = Range("A65000").End(xlUp).Row
For i = last To 2 Step -1
If Range("A" & i) = Range("A" & i - 1) Then
'Range("A" & i).EntireRow.Delete
Range("A" & i).EntireRow.Cut (Sheet2)
End If
Next i
End Sub
This line Range("A" & i).EntireRow.Cut (Sheet2) doesn't past the information in Sheet2!
I hope someone can help me....
Reez
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|