Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shift a cut row up
try this as an alternative:
Sheets("Database").Rows(iSourceRow).Copy Sheets("archive").Rows(iTgtRow).PasteSpecial xlValues Sheets("Database").Rows(iSourceRow).Delete "Risky Dave" wrote in message ... Hi, I have some code that cuts a row from one sheet (Database) and pastes it into another one (Archive): Dim iSourceRow As Integer Dim iTgtRow As Integer Sheets("Database").Range(iSourceRow & ":" & iSourceRow).cut_ Destination:=Sheets("archive").Range(iTgtRow & ":" & iTgtRow) This works fine except that I cannot get the Database sheet to shift up all teh rows below the one that is cut (so that all the data rows are contiguous). I have tried adding Shift:= xlUp to the line above, but this generates an "Expected: end of statement" error Suggestions on how I can get the rows to move up woould be welcome. TIA Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SHIFT G | Excel Discussion (Misc queries) | |||
Shift-JIS to UTF-8 | Excel Programming | |||
Shift Key | Excel Programming | |||
What's This? help (Shift-F1) | Excel Programming | |||
How 2 use right shift "<<" and left shift "" operator in excel? | Excel Programming |