ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy insert macro (https://www.excelbanter.com/excel-programming/320824-copy-insert-macro.html)

snax500[_2_]

copy insert macro
 
I have the following macro:

' Keyboard Shortcut: Ctrl+Shift+e
'

Selection.Insert Shift:=xlDown

I use this to copy data and insert. I don't like too use the mouse so I
use Shortcut keys. The problem is that I have to always go back and
copy my selection each time I use Ctrl+Shift+e. For example I have in
cell A1 "JOE". I want to go to A1, use Ctrl C - copy and then go to
multiple areas in my sheet, press Ctrl+Shift+e and insert and shift
down "JOE". When I use my macro it does it once and then does not work
again unless I go back to cell A1 and copy again. How can I fix this?
Thanks


Charles Harmon

copy insert macro
 
Hi,

This is something that may help. There are probably otherway's, but....


Public myname
Sub Macro1()
''Assign short cut key to this macro
Selection.Insert Shift:=xlDown
myname = Selection
Sheet1.Range("g1").Value = myname<<<< this can be placed out of the way
End Sub
Sub Macro2()
''assign short cut key to this macro
ActiveCell.Value = myname
End Sub

"snax500" wrote in message
ups.com...
I have the following macro:

' Keyboard Shortcut: Ctrl+Shift+e
'

Selection.Insert Shift:=xlDown

I use this to copy data and insert. I don't like too use the mouse so I
use Shortcut keys. The problem is that I have to always go back and
copy my selection each time I use Ctrl+Shift+e. For example I have in
cell A1 "JOE". I want to go to A1, use Ctrl C - copy and then go to
multiple areas in my sheet, press Ctrl+Shift+e and insert and shift
down "JOE". When I use my macro it does it once and then does not work
again unless I go back to cell A1 and copy again. How can I fix this?
Thanks





All times are GMT +1. The time now is 04:27 PM.

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