Paste / Special / Transpose Code

Benjamin_Hogan

New Member
Joined
Mar 10, 2010
Messages
16
Dear Sirs,

The code up to the RIGHT step works fine, but the PasteSpecial part. Can someone please help me out telling me what am I doing wrong?

Also, I have not been able to find a reference about Expriecions, such as the definition and examples of usage.

Thank you for your help . . . .

Marco.-
Code:
Range("Q9:Q25").Select

Sheets("NOTE JOURNAL 3").Select

Range("T3").Select
Application.SendKeys "^{DOWN}", True
Application.SendKeys "{RIGHT}", True


PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Avoid SendKeys at ALL costs....but that's another story...

The reason it doesn't work, is you need to tell it where to paste..
Paste Special must be preceeded by a Range (where to paste to)..

Like Range("A1").PasteSpecial

it can't be just
PasteSpecial


Try this (without sendkeys)

Code:
Sheets("NOTE JOURNAL 3").Range("T3").End(xldown).Offset(0,1).PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
 
Upvote 0
Benjamin

You really, really should not use SendKeys.:)

What, in words, is this code meant to do?
 
Upvote 0
Well, the typical new record just goes to the T column, but at times I need to add information in either U:AK, in other times also/or in AL:Aw those two ranges are not always used and as I mention, complement the information deposited in the columns E:T - The columns A:D are filled-in manually.

Again, thank you very much for all your help . . .

Marco.-


Avoid SendKeys at ALL costs....but that's another story...

The reason it doesn't work, is you need to tell it where to paste..
Paste Special must be preceeded by a Range (where to paste to)..

Like Range("A1").PasteSpecial

it can't be just
PasteSpecial


Try this (without sendkeys)

Code:
Sheets("NOTE JOURNAL 3").Range("T3").End(xldown).Offset(0,1).PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,137
Members
449,207
Latest member
VictorSiwiide

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top