ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Moving Rows (Basic VBA Stuff) (https://www.excelbanter.com/excel-programming/379183-moving-rows-basic-vba-stuff.html)

Don Guillett

Moving Rows (Basic VBA Stuff)
 
Sub moveselection()
Selection.Cut
Cells(ActiveCell.Row - 4, 1).Insert
End Sub

--
Don Guillett
SalesAid Software

"None" wrote in message
...
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




Niek Otten

Moving Rows (Basic VBA Stuff)
 
Please fix your system date. You're messing up the newsgroups sorting.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"None" wrote in message ...
| 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
|



Gary Keramidas

Moving Rows (Basic VBA Stuff)
 
they have next year's date on their post and it shows up at the top of the list
in oe. i just deleted both of them from my pc.

--


Gary


"Jim Jackson" wrote in message
...
What are you talking about?
--
Best wishes,

Jim


"Niek Otten" wrote:

Please fix your system date. You're messing up the newsgroups sorting.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"None" wrote in message
...
| 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
|






Tushar Mehta

Moving Rows (Basic VBA Stuff)
 
You could use the Range object's Delete or Insert method with the
appropriate number of rows.

--
Regards,

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

In article ,
says...
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



Tom Ogilvy

Moving Rows (Basic VBA Stuff)
 
Tushar,

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

--
Regards,
Tom Ogilvy

"Tushar Mehta" wrote in message
om...
You could use the Range object's Delete or Insert method with the
appropriate number of rows.

--
Regards,

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

In article ,

says...
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





None

Moving Rows (Basic VBA Stuff)
 
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



All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com