ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copy cells (https://www.excelbanter.com/excel-worksheet-functions/78495-copy-cells.html)

Narkom

copy cells
 

How do I copy the cells A9,B9,C9 and D9 to A16,B16,C16 and D16 when I
press the key (F9) ? Afterwards I type new data in the cells A9 till D9
and press again (F9), then I want that the stuff from A16 till D16 go to
A17 till D17 and A9 till D9 again to A16 till D16.
Sorry for my bad english and hope that anyone helps me.
Thanks


--
Narkom
------------------------------------------------------------------------
Narkom's Profile: http://www.excelforum.com/member.php...o&userid=32642
View this thread: http://www.excelforum.com/showthread...hreadid=524486


Gary L Brown

copy cells
 
Start out by assigning F9 to your macro. Probably in the Workbook_Open
procedure.

Application.OnKey "{F9}", "MyMacro"

Then have a macro called 'MyMacro' or whatever that does this...

Range("A16").EntireRow.Insert
Range("A9:D9").Copy
Range("A16").PasteSpecial xlValues
Application.CutCopyMode = False
Range("A9").Select


Hope this helps,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Narkom" wrote:


How do I copy the cells A9,B9,C9 and D9 to A16,B16,C16 and D16 when I
press the key (F9) ? Afterwards I type new data in the cells A9 till D9
and press again (F9), then I want that the stuff from A16 till D16 go to
A17 till D17 and A9 till D9 again to A16 till D16.
Sorry for my bad english and hope that anyone helps me.
Thanks


--
Narkom
------------------------------------------------------------------------
Narkom's Profile:
http://www.excelforum.com/member.php...o&userid=32642
View this thread: http://www.excelforum.com/showthread...hreadid=524486




All times are GMT +1. The time now is 07:40 AM.

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