Copy Selection - Transpose Selection - Delete Selection

U

Uninvisible

I am trying to develop a macro which will allow me to copy a vertical
selection, paste special transpose it horizontally and then want to
delete (shift cells up) the vertical selection I copied. Any thoughts
on how to put this together? I am trying to develop one macro as I
need to copy and transpose several hundere records.
 
D

Dave O

If I may suggest: record a macro that does what you need it to do,
then post the recorded macro. Indicate in the text of your email what
ranges you highlighted, and what ranges are likely to vary from use to
use.

Dave O
Eschew obfuscation
 
U

Uninvisible

If I may suggest: record a macro that does what you need it to do,
then post the recorded macro. Indicate in the text of your email what
ranges you highlighted, and what ranges are likely to vary from use to
use.

Dave O
Eschew obfuscation

The following is the macro when the ranges are fixed:

Range("A119:A126").Select
Selection.Copy
Range("G141").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Range("A119:A126").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp

As the ranges will shift, I am fine selecting the cells in the first
range ("A119:A126" in the example above) manually but once I select
the destination range ("G141" in the example above), I want to run the
macro so that the data is pasted and the source is deleted by a
Shift:=xlUp command.
 

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