imported_unknown
Active Member
- Joined
- Jan 13, 2002
- Messages
- 424
Hi all,
well i have tried but i am stuck in this, well i want to manage some data in Excel, the problem is the sequence no, and the reference no in my file are to be aranged and then sorted after that i want to cut the alike sequence no. with the related contents in the row and past to other sheet. what i have been able to come up is
Sub MyProject()
' Sort table according to col A and B
Selection.sort _
Key1:=Range("A1"), Order1:=xlAscending, _
Key2:=Range("B1"), Order2:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
' Compare values
Sheets("Sheet1").Select
Error on this line
ActiveCell.formulaRC1 = "=IF(RC[-2]=R[1]C[-2]) then Rows(r:r).Select"
Selection.Cut
Sheets("Sheet2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Selection.Delete Shift:=xlUp
Selection.AutoFill Destination:=Range("a1:a50"), Type:=xlFillDefault
End Sub
can you please help me out on this one. really thankful
Sohail
well i have tried but i am stuck in this, well i want to manage some data in Excel, the problem is the sequence no, and the reference no in my file are to be aranged and then sorted after that i want to cut the alike sequence no. with the related contents in the row and past to other sheet. what i have been able to come up is
Sub MyProject()
' Sort table according to col A and B
Selection.sort _
Key1:=Range("A1"), Order1:=xlAscending, _
Key2:=Range("B1"), Order2:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
' Compare values
Sheets("Sheet1").Select
Error on this line
ActiveCell.formulaRC1 = "=IF(RC[-2]=R[1]C[-2]) then Rows(r:r).Select"
Selection.Cut
Sheets("Sheet2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Selection.Delete Shift:=xlUp
Selection.AutoFill Destination:=Range("a1:a50"), Type:=xlFillDefault
End Sub
can you please help me out on this one. really thankful
Sohail