Macro, move marked area two rows

CHVEG

New Member
Joined
Mar 31, 2009
Messages
3
Nice forum

I need a macro that do a simple move and starts from the marked cell.
When i record i start from the same cell when i recorded.
I made it easy to understand by typing in the commands i use on the keyboard, that i want the macro to do.

Start from the marked cell
shift + right arrow (mark the cell next to it)
shift + ctrl + down arrow (mark 2collums down as long there it is data)
Move the marked range two rows down (dont know any shortcommand for this, i use the mouse)

Thanks
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Nice forum

I need a macro that do a simple move and starts from the marked cell.
When i record i start from the same cell when i recorded.
I made it easy to understand by typing in the commands i use on the keyboard, that i want the macro to do.

Start from the marked cell
shift + right arrow (mark the cell next to it)
shift + ctrl + down arrow (mark 2collums down as long there it is data)
Move the marked range two rows down (dont know any shortcommand for this, i use the mouse)

Thanks

I figured out that it start from the mark cell if you type nothing.
And the step 3 in my list abowe has the code:
Code:
    Range(Selection, Selection.End(xlDown)).Select

But i still dont know basic commands, that move and mark cells that is not a specific cell like c32, but the next one.
Or the code to move the marked selection two steps instead of move it to c32.
 
Upvote 0
Aha...it was relative cell instead of absolute cell.
Here is the code

Code:
    ActiveCell.Range("A1:B1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Cut Destination:=ActiveCell.Offset(2, 0)
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top