ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Move data on multiple tab to one (https://www.excelbanter.com/excel-discussion-misc-queries/248577-move-data-multiple-tab-one.html)

Supe

Move data on multiple tab to one
 
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?

muddan madhu

Move data on multiple tab to one
 
http://msdn.microsoft.com/en-us/library/cc793964.aspx



On Nov 17, 10:52*am, Supe wrote:
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?



JBeaucaire[_131_]

Move data on multiple tab to one
 
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?
--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Supe" wrote:

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?



All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com