combine data in multiple sheets into one

Urlord

Board Regular
Joined
Aug 5, 2010
Messages
130
Hello
I have a workbook that has worksheets named for each day of the week
Column A has the date and the row contains that dates data. Is it posible to take the data from each Worksheet and insert the data in date order into one sheet.
I am using Office 2007

Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello
I have a workbook that has worksheets named for each day of the week
Column A has the date and the row contains that dates data. Is it posible to take the data from each Worksheet and insert the data in date order into one sheet.
I am using Office 2007

Thanks

you can create a macro that grabs all the data you need from each sheet and inserts the data onto a new sheet, once all the data is together, write a macro to sort it ascending. Or have the data pasted into a table and you can sort it however and whenever you like.

try this:

Sub grabdata()
Dim i As Long, s As Long, p As Long

s = 1


' change the 3 to however many worksheets you have plus 1
Do Until s = 3
ActiveWorkbook.Sheets("Sheet" & s).Activate
'you will have to add at the end of this function to fit exactly how many cells you need to grab. (ie i start data at A3 so i need to add + 2 after the parenthesis
i = Application.WorksheetFunction.CountA(Worksheets("Sheet" & s).Range("A1:A50000")) + 2
'change 2 to the row your data is starting
ActiveSheet.Range("A3:B" & i).Select
Selection.Copy
'change sheet name to the name of the sheet where you are pasting data
ActiveWorkbook.Sheets("Paste").Select
p = Application.WorksheetFunction.CountA(Worksheets("Paste").Range("A1:A50000"))
ActiveSheet.Range("A" & p + 1).Select
Selection.PasteSpecial xlValues

s = s + 1

Loop


End Sub
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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