By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,454 Members | 2,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,454 IT Pros & Developers. It's quick & easy.

Macro help

P: 21
I don't know where to post my question, so I am sure I will get reprimanded, but I need help with a macro in excel. I currently have a row that is linked to certain cells throughout my workbook, which is constantly changing. What I am trying to do is create a macro that will take that row and copy the data across columns. I currently have it copying the data and transposing it into a column but every time I run the macro it copies down the column instead of going across to the next column. I know very little about macros and what I have I got from a macro someone else wrote with some minor modifications, so I appologize for my ignorance. This is what I have.
Expand|Select|Wrap|Line Numbers
  1. Sub Transferdata()
  2. Sheets("Sheet1").Select
  3.     Range("A20:D20").Select
  4.     Application.CutCopyMode = False
  5.     Selection.Copy
  6.     ActiveWindow.SmallScroll Down:=359
  7.     Range("A60").Select
  8.     Selection.End(xlUp).Select
  9.     ActiveCell.Offset(1, 0).Range("A1").Select
  10.     Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
  11.         False, Transpose:=True
  12.     Application.CutCopyMode = False
  13.  
  14. End Sub
Thanks in advance
Jan 27 '10 #1
Share this Question
Share on Google+
9 Replies


RedSon
Expert 5K+
P: 5,000
I think those macros are in VB. So lets move this over there.
Jan 27 '10 #2

P: 21
Thank you for moving it. I am sorry I did not post in the correct place.
Jan 27 '10 #3

100+
P: 1,059
First of all why are you calling a sub macro? may be it is macro, I dont know.

Can you be more specific where are you doing this. I guess Microsoft excel.

Make it clear
where are you doing this(development environment)

Regards,
Johny
Jan 27 '10 #4

RedSon
Expert 5K+
P: 5,000

P: 21
Yes it is in Microsoft Excel.
Jan 27 '10 #6

100+
P: 1,059
cool. I like it.

I just found this link. here. it may be helpful. :) I dont use Microsft Office, so cant check :).
Jan 27 '10 #7

NeoPa
Expert Mod 15k+
P: 31,186
I think this wants to be in Access/VBA. We get a few Excel questions in there and the VB version is more similar.

I'll see if I can look at this again when I have some time.
Jan 28 '10 #8

nico5038
Expert 2.5K+
P: 3,072
The "Transpose:=True" parameter is causing the data to be pasted vertically.
So that has to be changed from "True" in "False" like "Transpose:=False".

Nic;o)
Jan 28 '10 #9

NeoPa
Expert Mod 15k+
P: 31,186
@jotr
I suspect you're right Nico. I must admit from the quoted part of the Original Post I rather assumed that the Original Poster appreciated this point. I now doubt they did, so hopefully this will sort the problem for them.
Jan 29 '10 #10

Post your reply

Sign in to post your reply or Sign up for a free account.