Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete "Cut" row on move...?
It seems as though you should be able to do the following using a single line
of code somehow, but I can't figure it out. Can someone please help figure out the most efficient method? Cut the current row (ActiveCell) from the ActiveSheet to the next unused row in sheet "ERR" AND AT THE SAME TIME delete the empty row created by this action in the source sheet. I have tried the following: ActiveCell.EntireRow.Cut Destination:=Sheets("ERR").Range("A65536").End(xlU p).Offset(1, 0) BUT, this method fails to delete the row on the active sheet. Can this be done? Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete "Cut" row on move...?
quartz
ActiveCell.EntireRow.Cut _ Destination:=Sheets("ERR").Range("A65536").End(xlU p).Offset(1, 0) ActiveCell.EntireRow.Delete xlShiftUp Gord Dibben Excel MVP On Thu, 9 Dec 2004 14:42:13 -0800, quartz wrote: It seems as though you should be able to do the following using a single line of code somehow, but I can't figure it out. Can someone please help figure out the most efficient method? Cut the current row (ActiveCell) from the ActiveSheet to the next unused row in sheet "ERR" AND AT THE SAME TIME delete the empty row created by this action in the source sheet. I have tried the following: ActiveCell.EntireRow.Cut Destination:=Sheets("ERR").Range("A65536").End(xl Up).Offset(1, 0) BUT, this method fails to delete the row on the active sheet. Can this be done? Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete "Cut" row on move...?
Thanks much Gord.
I was sort of hoping for something like: Range(lngTopRow & ":" & lngBotRow).EntireRow.Cut(Shift:=xlUp) = Sheets(pcstrSheetERR).Range("A65536").End(xlUp).Of fset(1, 0) But, I guess it really needs to be done in two moves. "Gord Dibben" wrote: quartz ActiveCell.EntireRow.Cut _ Destination:=Sheets("ERR").Range("A65536").End(xlU p).Offset(1, 0) ActiveCell.EntireRow.Delete xlShiftUp Gord Dibben Excel MVP On Thu, 9 Dec 2004 14:42:13 -0800, quartz wrote: It seems as though you should be able to do the following using a single line of code somehow, but I can't figure it out. Can someone please help figure out the most efficient method? Cut the current row (ActiveCell) from the ActiveSheet to the next unused row in sheet "ERR" AND AT THE SAME TIME delete the empty row created by this action in the source sheet. I have tried the following: ActiveCell.EntireRow.Cut Destination:=Sheets("ERR").Range("A65536").End(xl Up).Offset(1, 0) BUT, this method fails to delete the row on the active sheet. Can this be done? Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How do I move a document from "recent items" to "documents" | New Users to Excel | |||
Excel "Move or Copy" and "Delete" sheet functions | Excel Worksheet Functions | |||
Any way to use toolbar button to delete cells and move cells "up"? | Excel Discussion (Misc queries) | |||
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc | Excel Programming |