View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Cutting rows and inserting in another sheet

Here is something a little more generic.

Sub cut_n_paste()
Dim rng1 As Range
Dim rng2 as Range
Set rng1 = Selection
Set rng2 = Application.InputBox(Prompt:= _
"Select A Cell to Paste to", Type:=8)
rng1.EntireRow.Cut Destination:=rng2
rng1.EntireRow.Delete
End Sub


Gord

On Tue, 22 May 2007 20:54:32 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

Karen

Do the cut and paste with a macro and delete the blank row(s)

Macro...........

Sub cut_n_paste()
Dim rng1 As Range
Set rng1 = Selection
rng1.EntireRow.Cut Destination:= _
Worksheets("Sheet2").Range("A1")
rng1.EntireRow.Delete
End Sub


Gord Dibben MS Excel MVP


On Tue, 22 May 2007 17:21:01 -0700, Karen Bates <Karen
wrote:

Is there a way to set up Excel to delete the blank row that is created when a
row is cut and pasted to another sheet?

Thanks