Compiling Macro Help

02coamat

New Member
Joined
Jul 21, 2015
Messages
9
Hi,

I have a workbook with 7 tabs, 1 called "Main" and 1 called "Reference". Others have other names (Let's call them Sheet1, Sheet2 etc.).

I am trying to copy the data held in Sheet1, Sheet2 etc. into the "Main" tab, one under each other, so as to create a masterlist of data held in the other tabs. I want it to copy all data below row 7 from the source sheets into the Main sheet (which starts at row 7 too). Each number of rows in the source lists varies and I want it to paste over/delete what was in the Main sheet before.

This is what I have so far, but I'm not sure it's useful...

Sub SummariseSheets()
Dim ws As Worksheet

Application.ScreenUpdating = False
Sheets("Main").Activate

For Each wsSheet In Worksheets
If wsSheet.Name <> "Main" Or _
wsSheet.Name <> "References" Then
ws.Range("B7:N29").Copy
Worksheets("Main").Range("B6").End(xlDown).Offset(1, 0).PasteSpecial (xlPasteValues)
End If
Next ws
End Sub


Any help would be really appreciated.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
02coamat,

Welcome to the MrExcel forum.

1. What version of Excel, and, Windows are you using?

2. Are you using a PC or a Mac?


So that we can get it right on the first try, it would help if we could see your actual raw data workbook/worksheets.

The following is a free site:

You can upload your workbook to (the BLUE link-->) Box Net ,

sensitive data changed

mark the workbook for sharing

and provide us with a link to your workbook.
 
Upvote 0
Thanks - I haven't been able to sign up to this website, hopefully this link will be ok!
https://drive.google.com/file/d/0B3T3YTHIXqssR0M3MEstaWlvYnM/view?usp=sharing

I haven't included any data yet...

02coamat,

Thanks for the workbook.

I have had a problem in the past when downloading/opening an Excel file with the file extension xlsm.

Please save the workbook as an xlsx file, and, re-post again on google.


I am just checking in early (before we go out an play a round of golf) to see if I have any updates to do.

I will be back later today with an update.
 
Upvote 0
02coamat,

When I click on your new link I get: Sign in to continue to Google Drive
 
Upvote 0
02coamat,

There is no raw data in any of the worksheets, except worksheet References?????
 
Upvote 0
Yes - I haven't input any data as I'm just building the framework.

Essentially the data will always be changing, pieces added & taken away, and I need it to be able to be flexible on that. If there is no data, move to the next tab instead.

Is that an issue?
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top