473,414 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Macro help

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
9 2474
RedSon
5,000 Expert 4TB
I think those macros are in VB. So lets move this over there.
Jan 27 '10 #2
jotr
21
Thank you for moving it. I am sorry I did not post in the correct place.
Jan 27 '10 #3
johny10151981
1,059 1GB
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
5,000 Expert 4TB
Johny,

Read this: http://office.microsoft.com/en-us/ex...012011033.aspx
Jan 27 '10 #5
jotr
21
Yes it is in Microsoft Excel.
Jan 27 '10 #6
johny10151981
1,059 1GB
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
32,556 Expert Mod 16PB
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
3,080 Expert 2GB
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
32,556 Expert Mod 16PB
@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

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

Similar topics

25
by: Andrew Dalke | last post by:
Here's a proposed Q&A for the FAQ based on a couple recent threads. Appropriate comments appreciated X.Y: Why doesn't Python have macros like in Lisp or Scheme? Before answering that, a...
2
by: Pete | last post by:
In Access 95/97 I used to be able to create pull down menus (File,Edit ...) from a macro. It seems there used to be some wizard for that. However in Access 2000 it seems you have to build your...
8
by: Nick M | last post by:
Hello All, Excellent info here Thanks! I am very new to using access in general and I am on a learning curve. I'm trying to import an excel workbook (with worksheets) into an access db via a...
10
by: Karim Thapa | last post by:
Why following macro does not work? #define removebrace(x) x void Foo(int a, int b, char *txt, int d, int e); main() {
4
by: Garry Freemyer | last post by:
I'm trying to convert this macro to a c# function but I have a big problem. It's on the LEFT side of an assignment statement and I am extremely flustered over this one because I'm a little rusty...
6
by: Takeadoe | last post by:
Dear NG, Can someone assist me with writing the little code that is needed to run an update table query each time the database is opened? From what I've been able to glean from this group, the...
2
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
0
by: =?Utf-8?B?TGV0emRvXzF0?= | last post by:
I'd like to create a Macro that will sort some raw data, apprx 20k lines, remove some lines based upon a condition in a certain column. Then copy this data into a new spreadsheet and sort the ...
1
by: skennd | last post by:
Hello, All your help is appreciated in this problem. I am running a macro to execute certain queries and the macro is started to run by a windows task scheduler. However, after the macro runs...
2
by: Stratocaster | last post by:
Hello, and thank you for any help in advance. I need help determining if any commands exist in VB (Excel macro style) that can enable a user to select cells and run a macro which performs...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.