Move data on multiple tab to one

S

Supe

I have a worksheet that has 60 tabs for different vendors that all list that
vendors UPC, dollars, and units. Is there a way to mover the contents of all
of these tabs into one tab or worksheet without copying and pasting each
individually?
 
J

JBeaucaire

My stock macro for this:

========
Sub ConsolidateSheets()
'JBeaucaire (6/26/2009)
'Merge all sheets in a workbook into one summary sheet (stacked)
Dim cs As Worksheet, ws As Worksheet
Dim LR As Long, NR As Long

If Not Evaluate("ISREF(Consolidated!A1)") Then _
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = "Consolidated"

Set cs = Sheets("Consolidated")
cs.Cells.ClearContents
NR = 1

For Each ws In Worksheets
If ws.Name <> "Consolidated" Then
LR = ws.Range("A" & Rows.Count).End(xlUp).Row
ws.Range("A1:BB" & LR).Copy
cs.Range("A" & NR).PasteSpecial xlPasteValues
Application.CutCopyMode = False
NR = cs.Range("A" & Rows.Count).End(xlUp).Row + 1
End If
Next ws

cs.Activate
Range("A1").Select
End Sub
==========

Does that help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top