Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Macro to copy

I would like a macro that will do the following:
Copy data from A1 to b1 to c1 to d1 to e1 to e2 to e3 to e4 to d4 to c4 to
b4 to a4 to a3 to a2
(I am created a rectangle with the data.
What make it more complicated is that I want that macro to do this same
function from anywhere on the sheet- (Ie- start from the select cell and go
to the right 4 times then down 3 then left 4 and up to the start point
I would appreciate any help\Thanks

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default Macro to copy

Play with this
Sub copyactivecell()
With ActiveCell
..Copy
..Resize(4, 1).PasteSpecial
..Resize(1, 4).PasteSpecial
..Offset(0, 3).Resize(4, 1).PasteSpecial
..Offset(4, 0).Resize(1, 4).PasteSpecial
End With
Application.CutCopyMode = False
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"pcor" wrote in message
...
I would like a macro that will do the following:
Copy data from A1 to b1 to c1 to d1 to e1 to e2 to e3 to e4 to d4 to c4 to
b4 to a4 to a3 to a2
(I am created a rectangle with the data.
What make it more complicated is that I want that macro to do this same
function from anywhere on the sheet- (Ie- start from the select cell and
go
to the right 4 times then down 3 then left 4 and up to the start point
I would appreciate any help\Thanks


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Macro to copy


Not much luck with that...got different errors including telling me the
clipboard contained data the wrong size
Thanks for the Effort
"Don Guillett" wrote:

Play with this
Sub copyactivecell()
With ActiveCell
..Copy
..Resize(4, 1).PasteSpecial
..Resize(1, 4).PasteSpecial
..Offset(0, 3).Resize(4, 1).PasteSpecial
..Offset(4, 0).Resize(1, 4).PasteSpecial
End With
Application.CutCopyMode = False
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"pcor" wrote in message
...
I would like a macro that will do the following:
Copy data from A1 to b1 to c1 to d1 to e1 to e2 to e3 to e4 to d4 to c4 to
b4 to a4 to a3 to a2
(I am created a rectangle with the data.
What make it more complicated is that I want that macro to do this same
function from anywhere on the sheet- (Ie- start from the select cell and
go
to the right 4 times then down 3 then left 4 and up to the start point
I would appreciate any help\Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro copy Pammy Excel Discussion (Misc queries) 1 April 28th 07 03:48 PM
macro to copy DTruong Excel Discussion (Misc queries) 0 August 4th 06 03:44 PM
Copy a macro? Melissa Excel Discussion (Misc queries) 2 July 26th 06 08:32 PM
Copy a Macro Phil K Excel Discussion (Misc queries) 3 June 9th 05 01:52 PM
Help with copy macro Kel Excel Discussion (Misc queries) 13 February 21st 05 11:44 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"