Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kalz
 
Posts: n/a
Default use marco to consolidate

Hello,

I'd like to set a macro which helps to copy and paste rows of data from
several wksheets into one consolidated worksheet. As this needs to be done in
regular interval and the rows of data in the original files can vary from
time to time. I do not know how to perfectly and automatically do such
consolidation using macro.

Pls help,
thx

  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
as a starting point:
http://www.rondebruin.nl/copy2.htm

"kalz" wrote:

Hello,

I'd like to set a macro which helps to copy and paste rows of data from
several wksheets into one consolidated worksheet. As this needs to be done in
regular interval and the rows of data in the original files can vary from
time to time. I do not know how to perfectly and automatically do such
consolidation using macro.

Pls help,
thx

  #3   Report Post  
kalz
 
Posts: n/a
Default

Hello,
I need to create a macro to consolidate data from several worksheets onto one.

Here's part of my VBA code that I copy the rows from an opened
worksheet-A.xls ,and paste onto Book1.xls . However, it is very inconvenient
as to open all the worksheets every time to proceed the consolidation (i.e.
from 10 into 1) , in order to avoid any debugging message pop up. Can I run
the macro without opening the all the source data wksht? Possibly place the
file directory in the code i.o. using - * Windows("A.xls").Activate * ?

E.g. VBA

Windows("A.xls").Activate
NoOfRowFile1 = 2

'Get the total rows of this sheet
Do While Cells(NoOfRowFile1, 1) < ""
NoOfRowFile1 = NoOfRowFile1 + 1
Loop
' Include the header
NoOfRowFile1 = NoOfRowFile1

If NoOfRowFile1 1 Then
'Cells(2,1) = A2
Range(Cells(1, 1), Cells(NoOfRowFile1, 10)).Select

Selection.Copy
Windows("Book1.xls").Activate
Range("A1").Select
ActiveSheet.Paste
End If

Thx ever so much!!
kalz


"Frank Kabel" wrote:

Hi
as a starting point:
http://www.rondebruin.nl/copy2.htm

"kalz" wrote:

Hello,

I'd like to set a macro which helps to copy and paste rows of data from
several wksheets into one consolidated worksheet. As this needs to be done in
regular interval and the rows of data in the original files can vary from
time to time. I do not know how to perfectly and automatically do such
consolidation using macro.

Pls help,
thx

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting a Marco Lance Gray Excel Discussion (Misc queries) 1 January 5th 05 08:52 PM
Consolidate Non-numeric data Brian Excel Discussion (Misc queries) 5 December 8th 04 04:45 PM
Marco Loi New Users to Excel 4 December 7th 04 08:52 PM
How do I use a" item description" in excel to consolidate totals? D Excel Discussion (Misc queries) 1 December 7th 04 04:06 PM
Consolidate list from multiple worksheets VT Excel Worksheet Functions 0 November 24th 04 04:51 PM


All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"