Transfer multible sheets into the existing sheet named "Results"

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
890
Hi all, i would like to create a VBA code so that to run through a workbook and transfer all Sheets' data (Sheet1, Sheet2 e.t.c.) into the first one, on the left which is named "Results" and it already exists. Therefore that The data of each Sheet, should be placed into "Results", below each other.
The Sheets are not stably and have no standard name and are more than 2 but no more than 50.
However, the meaning of code is update my results whenever i enter new data in any of spreadsheet.
Thanks to all in advance
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hello Panoos64,

Try the following code assigned to a button on the "Results" sheet:-


Code:
Sub Test()

Dim ws As Worksheet, sh As Worksheet
Set sh = Sheets("Results")

Application.ScreenUpdating = False

sh.UsedRange.Offset(1).Clear

For Each ws In Worksheets
       If ws.Name <> "Results" Then
       ws.UsedRange.Offset(1).Copy sh.Range("A" & Rows.Count).End(3)(2)
       End If
Next ws

Application.ScreenUpdating = True

End Sub

The code also clears the "Results" sheet prior to any new data being transferred. I'm assuming that you will be keeping all data in the source sheets.

I hope that this helps.

Cheerio,
vcoolio.
 
Upvote 0
Thank you so much vcool. It works perfect and based to my data. Thanks also for your time spent for my project. Hv a great, lovely day!!
 
Upvote 0
You're welcome Panoos.
I'm glad that I was able to help and thanks for the feed-back.

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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