Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() 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 |
#5
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() you are right...removing the dot did it THANKS "Don Guillett" wrote: Funny, I put my cursor on a cell put x in itfired the macro and all worked just fine. BTW, there should only be ONE dot for each line in the with statement. You have TWO. If you like I can send a workbook. Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... 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 |
#6
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() Glad to help -- Don Guillett Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... you are right...removing the dot did it THANKS "Don Guillett" wrote: Funny, I put my cursor on a cell put x in itfired the macro and all worked just fine. BTW, there should only be ONE dot for each line in the with statement. You have TWO. If you like I can send a workbook. Microsoft MVP Excel SalesAid Software "pcor" wrote in message ... 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro copy | Excel Discussion (Misc queries) | |||
macro to copy | Excel Discussion (Misc queries) | |||
Copy a macro? | Excel Discussion (Misc queries) | |||
Copy a Macro | Excel Discussion (Misc queries) | |||
Help with copy macro | Excel Discussion (Misc queries) |