Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Optimize Code

Status
Not open for further replies.

Bass71

MIS
Jun 21, 2001
79
Hello, I have the following code to determine if a cell is populated and if so, it cuts and pastes a range of text and then deletes the previous row. It seems as though there'd be a simpler way to accomplish this.

If ActiveCell(1, 0).Value = " x " Then
Range(ActiveCell, ActiveCell.End(xlToRight)).Select
Selection.Cut
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Offset(-1, 0).Select
Selection.EntireRow.Delete
End If

Any idears?
Thanks............RO
 
Can you give some examples? Also, how are you firing this code? From a standard procedure? Workbook/sheet event?

-----------
Regards,
Zack Barresse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top