Database Management

KO69

New Member
Joined
Sep 12, 2012
Messages
7
I have a spreadsheet with about 1000 rows.

I want to automate a process where I do the following steps:
- start on a cell
- copy the cell
- move one cell to the right
- ctrl+down
- move left twice
- ctrl+shft+up
- move down twice (whilst still highlighting the cells)
- ctrl+v

Thanks for any help
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Here you go,

You can do this by using the record macro and simply going in and editing it a bit to make it generic.

I've set this one up for me to execute when I hit CTRL+SHIFT+C

Code:
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+Shift+C
'
'- start on a cell
'- copy the cell
    Selection.Copy
'- move one cell to the right
    Selection.Offset(0, 1).Select
'- ctrl+down
    Selection.End(xlDown).Select
'- move left twice
    Selection.Offset(0, -2).Select
'- ctrl+shft+up
    Selection.End(xlUp).Select
'- move down twice (whilst still highlighting the cells)
    Range(Selection, Selection.Offset(2, 0)).Select
'- ctrl+v
    ActiveSheet.Paste
'Clean up
    Application.CutCopyMode = False
End Sub

Regards,
jc
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,360
Members
449,155
Latest member
ravioli44

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