Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Cutting rows and inserting in another sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Cutting rows and inserting in another sheet

I am not sure of a fast and easy way, but what I usually do is cut and paste
the data and then do a quick sort of the area you are interested in and it
will toss the blank rows at the bottom. You could easily write a macro that
does this.
--
TG


"Karen Bates" 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Cutting rows and inserting in another sheet

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


  #4   Report Post  
Posted to microsoft.public.excel.misc
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


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Cutting rows and inserting in another sheet

This one mostly works except that the row that gets deleted isn't the blank
row, it is the row number on the source spreadsheet that corresponds to the
row number on the destination sheet. In other words, I cut row 10 on Sheet 1
and pasted to row 27 on Sheet 2. The row that ends up getting deleted is row
27 on Sheet 1.

Thanks!

"Gord Dibben" wrote:

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





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Cutting rows and inserting in another sheet

With the "generic" code posted I get the cut and paste OK to sheet2 but the
Sheet1 cut row is left blank.

Change to this below seems to do OK.

Sub cut_n_paste22()
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.Copy Destination:=rng2
rng1.EntireRow.Delete
End Sub


Gord

On Wed, 23 May 2007 10:58:01 -0700, Karen Bates
wrote:

This one mostly works except that the row that gets deleted isn't the blank
row, it is the row number on the source spreadsheet that corresponds to the
row number on the destination sheet. In other words, I cut row 10 on Sheet 1
and pasted to row 27 on Sheet 2. The row that ends up getting deleted is row
27 on Sheet 1.

Thanks!

"Gord Dibben" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting rows in entire sheet add Excel Discussion (Misc queries) 1 March 30th 07 04:10 PM
Cutting and pasting from rows into columns and visa versa. Pank New Users to Excel 2 November 8th 06 01:54 PM
Cutting Rows from one Worksheet to another based on a value Edwyn Excel Discussion (Misc queries) 0 October 20th 06 12:11 PM
cutting and pasting rows from one sheet to another generates error JT Spitz Excel Discussion (Misc queries) 7 February 14th 06 07:06 PM
inserting rows at common word in a sheet Ankur Excel Discussion (Misc queries) 0 August 10th 05 11:18 AM


All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"