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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy and past range with transpose

Status
Not open for further replies.

nina1

Programmer
Aug 14, 2001
31
CA
Hi,

I am new in VBA and I need help to write this small macro.

I have an excel file that look like this:

Parent# child #
110 320
110 450
110 220
150 440
150 320
150 125
150 130
and so on.
I need to write a macro that will copy child# across the columns and will look like this:

110 320 450 220
150 440 320 125 130

Thanks very much in advance

 
Try posting this in the VBA forum, at this link: forum707


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
In VBA, you do it like so...

Sheet1.Range("A2", "B5").Copy
Dim myRet As Boolean
myRet = Sheet1.Range("A7").PasteSpecial(, , , True)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top