PDA

View Full Version : Delete and Move a row in excel



ads_3131
07-22-2011, 02:55 AM
Hi all

struggling with this one,

I have a spread sheet, i want to delete a row by clicking a clear button at the begining of the row (this works)

But what i need help with, is when i click the clear button not only does it delete the rows specified cells but i then want it moving/copying from sheet one to sheet two into a set specific range ....

Below is the code i have in the button at the front of the row:

Sub Macro_ads_3131()
' Macro_ads_31 Macro
' Macro recorded 06/06/2011 by P266-PC
Range("F174: L177 , M175: N176 , P174: S177 , T174: T176 , U174: IJ176 ").Select
Range("U176").Activate
Selection.ClearContents
ActiveWindow.ScrollColumn = 21
Range("F174:F177").Select
End Sub I need code to put into this to copy/move the date from sheet one into sheet two cells that i define , help please :)

parttime_guy
07-22-2011, 07:20 PM
It would be great with some sample data ....

But have u tried copy/paste values into the fields required before deleting something like

Sheets("UR Wksht Name).Range("B5") = Sheets("UR Wksht Name").Range("C5").Value

or

Sheets("Wksht1").Range("A1:A20") = Sheets("Wksht2").Range("B1:B20").Value