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:office:office" /><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.:eeek:


<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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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