Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Copy Paste special transpose 1

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
0
0
US
I would like to know if VBA can help me do a copy then paste special transpose AND maintain the formatting of the paste location.

Thanks,
 
I took this:

[pre]
A B
1 1/1/2018 date
2 Joe text
3 123 number
4 $12.50 money
[/pre]
and with this code:

Code:
Range("A1:A4").Copy
Range("C1").PasteSpecial Paste:=xlPasteAll, _
    Operation:=xlNone, SkipBlanks:= False, Transpose:=True

I've got his:

[pre]
C D E F
1 1/1/2018 Joe 123 $12.50
[/pre]


---- Andy

There is a great need for a sarcasm font.
 
Thanks. One more thing. Did this leave the target formatting alone? If my paste range has formatting I want it to remain when new information is pasted in. Thanks again.
 
Try this...

Code:
Range("A1:A4").Copy
Range("C1").PasteSpecial Paste:=[b]xlPasteValues[/b], _
    Operation:=xlNone, SkipBlanks:= False, Transpose:=True

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
I will do this first thing in the morning. I will let you know the results. Thanks Skip
 
Skip,
Very nice. This does exactly what I want it to do. Thanks and here is a Star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top