ExceL VBA Question, Help Please

EagerToLearn

New Member
Joined
Jan 20, 2011
Messages
20
Hello there,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
I am still a beginner and need help form the pros,<o:p></o:p>
Where I work, I have a big excel book contains of like 45 tabs.<o:p></o:p>
I need to copy and paste certain section form each tab and consolidate it in one tab (on top of each other, like to start pasting the section at the row where you end pasting last section).<o:p></o:p>
I was kind of able to do that. <o:p></o:p>
My problems when I had to change the tabs name in the second line on the below code to manually key in every other tab name (in this case 1100, then 1200 and so on)<o:p></o:p>
Is there smarter way to do that?<o:p></o:p>
Thanks for your help.:eek:


<o:p></o:p>
ActiveCell.Select
Sheets("1100").Select
Range("A6:P255").Select
Selection.Copy
Sheets("BudgetUpload").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=225
ActiveSheet.Range("a1").End(xlDown).Offset(1, 0).Select
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to the board...

Try

Code:
Dim ws As Worksheet
For Each ws In Worksheets
    If ws.Name <> "BudgetUpload" Then
        ws.Range("A6:P255").Copy
        Sheets("BudgetUpload").Range("A" & Rows.Count).End(xlUp).Offset(1,0).PasteSpecial xlPasteValues
    End If
Next ws
 
Upvote 0
WOOOOOOOO, that was fast and right to the point, really demonstrate high standers.
You saved me time and effot.
I owe you a big thank you.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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