Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Moving Rows (Basic VBA Stuff)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
None - 11 Dec 2006 15:47 GMT
Rather than cut and paste rows, if there a way to select a range of
cells and just move them up or down a set number of rows? (I say a
range of cells, because on some sheets each record may contain more
than one row of data) The Pseudo code below gives an idea of the
context of what I am doing. The * line is the one in question. IF cut
and paste is the best way, could you post the cut and paste method?

Compare code
IF need to move up THEN
  SELECT Rows for this Record.
  *MOVE SELECTED Range up or down # of rows. *
END IF
Don Guillett - 11 Dec 2006 16:56 GMT
Sub moveselection()
Selection.Cut
Cells(ActiveCell.Row - 4, 1).Insert
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Rather than cut and paste rows, if there a way to select a range of
> cells and just move them up or down a set number of rows? (I say a
[quoted text clipped - 8 lines]
>   *MOVE SELECTED Range up or down # of rows. *
> END IF
Niek Otten - 11 Dec 2006 19:21 GMT
Please fix your system date. You're messing up the newsgroups sorting.

Signature

Kind regards,

Niek Otten
Microsoft MVP - Excel

| Rather than cut and paste rows, if there a way to select a range of
| cells and just move them up or down a set number of rows? (I say a
[quoted text clipped - 8 lines]
|   *MOVE SELECTED Range up or down # of rows. *
| END IF
Tushar Mehta - 20 Dec 2006 12:52 GMT
You could use the Range object's Delete or Insert method with the
appropriate number of rows.

Signature

Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

> Rather than cut and paste rows, if there a way to select a range of
> cells and just move them up or down a set number of rows? (I say a
[quoted text clipped - 8 lines]
>    *MOVE SELECTED Range up or down # of rows. *
> END IF
Tom Ogilvy - 22 Dec 2006 01:16 GMT
Tushar,

This thread was last active on 11 December.    OP had his date set in the
future.

Signature

Regards,
Tom Ogilvy

> You could use the Range object's Delete or Insert method with the
> appropriate number of rows.
[quoted text clipped - 11 lines]
>>    *MOVE SELECTED Range up or down # of rows. *
>> END IF
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.