Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Error
I'm using a macro to do a copy, paste special, transpose skip blank line and
repeat. I've used it in another worksheet and it worked fine. When I try to use it in my current work sheet (I copied the macro to the new worksheet) it gives me a run-time error 1004; copy area and paste area are not the same shape and size. If I make my selection smaller and then run the macro, it doesn't seem to pick up on the blank lines inbetween each entry; therefore transposing my data all onto ONE line. Sub Blank () Dim myArea As Range For Each myArea In Selection.SpecialCells(xlCellTypeConstants).Areas myArea.Copy Range("A25500").End(xlUp).Offset(1, 0) _ .PasteSpecial Paste:=xlAll, _ Operation:=xlNone, _ SkipBlanks:=False, _ transpose:=True Next myArea End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Error
hi,
check your code and make sure that you don't have any absolute adresses in it. -----Original Message----- I'm using a macro to do a copy, paste special, transpose skip blank line and repeat. I've used it in another worksheet and it worked fine. When I try to use it in my current work sheet (I copied the macro to the new worksheet) it gives me a run-time error 1004; copy area and paste area are not the same shape and size. If I make my selection smaller and then run the macro, it doesn't seem to pick up on the blank lines inbetween each entry; therefore transposing my data all onto ONE line. Sub Blank () Dim myArea As Range For Each myArea In Selection.SpecialCells (xlCellTypeConstants).Areas myArea.Copy Range("A25500").End(xlUp).Offset(1, 0) _ .PasteSpecial Paste:=xlAll, _ Operation:=xlNone, _ SkipBlanks:=False, _ transpose:=True Next myArea End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|