Combining 12 tabs, each representing a month of the year, into a YTD worksheet.

pbayer14

New Member
Joined
Nov 4, 2022
Messages
4
Office Version
  1. 2007
Platform
  1. Windows
Hello!

I need help combining 12 separate worksheets, each representing a month of the year, into one aggregate worksheet. The spreadsheet is used by my organizations employees to fill out their hours worked, the day of work, location of work, and type of work for the corresponding month. The worksheet is organized as follows:

  • Column A: Enter in date of work (there can be multiple entries of the same day if the employee works at differet locations or does different categories of work on the same day)
  • Column B: Enter in location of work
  • Column C: Enter in Hours worked
  • Column D: Enter in category of work
I am hoping to add a worksheet that combines this information from each of the monthly tab into one YTD value. Is there an easy way to do this besides copying and pasting?

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Easy to do with VBA. Lots of solutions here for combining worksheets to one summary sheet.

Would need a representative workbook to develop a specific solution for you. Maybe upload to Dropbox.
 
Upvote 0
Awesome! I’m happy to hear there is a solution.

How would you suggest I upload to your Dropbox? Sorry this is the first time i have used this site.

Thanks!
 
Upvote 0
the dropbox site should show you how to sign up (free for minimal space) and how to upload a file. You will then need to post a link here so we can get to it.
 
Upvote 0
Try this:
Create a sheet named "Master" and have that as sheet 1 on your workbook
This script will copy all rows on each sheet into a sheet named "Master"
This script looks down column A of each sheet and copies all those rows with data into the sheet named Master:
VBA Code:
Sub Copy_All_Sheets_Into_Master()
'Modified 11/4/2022  8:56:21 PM  EST
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long
Dim Lastrowa As Long
Lastrow = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row + 1

For i = 2 To Sheets.Count
    Lastrow = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row + 1
    Lastrowa = Sheets(i).Cells(Rows.Count, "A").End(xlUp).Row
    Sheets(i).Rows(1).Resize(Lastrowa).Copy Sheets("Master").Rows(Lastrow)
Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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