Macro Error

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top