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

Copy data from one workbook to other using macro - Newbie

Status
Not open for further replies.

Dissh

MIS
Mar 10, 2003
12
Hi,

I am so far manually entering data from one workbook onto another workbook for various accounts of us on a monthly basis. I have come to know using a macro this can be done really quickly.

Please can anyone help me write a macro code to copy just the total values (range A2:C2)from one workbook for any account to the summary workbook for all accounts.

It will make life very easy and in the meantime I can begin to learn macros.

Many Thanks
 
You can record yourself doing it in the macro recorder and then see what the code it generated looks like.

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 



Hi,

The kind of task that you describe, may be able to be done without any VBA code, if you data is set up as a table with headings in row 1.

faq68-5829.

It will have to be a parameter query.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
A great ally in learning macros (VBA code): The macro recorder.

Tools > Macro > Record New Macro

Then do whatever you want to automate. Press [Alt] + [F11] to view the generated code.

But let's back up.... How are you isolating the information for the single account which you want to copy? Are you using an Autofilter? Or manually selecting certain rows?

Post a sample of the kind of data you're dealing with, and describe what it is you want to do. You might not need a macro at all. And even if you do, you need to first know the best way to do what you're after without a macro - that way you know what to tell Excel to do.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
I am getting the data as an email for various accounts and each sheet has got several rows of data. All I need is the total of all the activity (just one row) every month for each account (nearly 20 of them) to be presented in a summary workbook for all the accounts.

I tried recording the macro but I would have to do it every month. I want a code which can be used for all months.

Hope this helps.
 



"I tried recording the macro ..."

Please post what you have already recorded. It will be a starting point and also instructive for other similar tasks.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top