A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combining different worksheets using VBA



 
 
Thread Tools Display Modes
  #1  
Old October 13th, 2016, 01:59 AM
jimmy2016 jimmy2016 is offline
Member
 
First recorded activity by OfficeFrustration: Sep 2016
Posts: 3
Default Combining different worksheets using VBA

Combining different worksheets into a single worksheet.

Dear helpers,

I am new to VBA and have the problem:
To combine worksheets into a single worksheet we always use copy and paste but if there are many worksheets, say 30, it will spend a lot of time in selecting and copying.
I want to create a button in sheet1 and onclick it, those tables in the worksheets(named A01,..,A30) will be copied to sheet1, say from sheet1!A15.

1. The worksheets will be of the same number of columns:
A1(name), B11(date), C11(number), D11(price)
but different rows of data.

2. In the workbook, there are other worksheets and the worksheets I want to cope with are A01,...A30 only.

3. The are other data in worksheets A01,...,A30 and the tables I want to copy are, say, A01!A11:P19, A02!A11:P13,....
Can the VBA code count the number of rows in the table in each worksheet?

Thanks for your help.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:28 AM.


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