• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how do I print an employee timesheet with employee individual name without having to print one at a time please?

Hi. I have attached a sample. I have Excel sheet with month. Where it says name I will insert employee name but just want to generate to print automatically with all employee names without having to insert a name at a time and print a sheet for each employee. Hope it makes sense
 

Attachments

  • Screenshot_20240831_055853_Excel.jpg
    Screenshot_20240831_055853_Excel.jpg
    295.4 KB · Views: 12
Thanks any help appreciated
Hi. I have attached a sample. I have Excel sheet with month. Where it says name I will insert employee name but just want to generate to print automatically with all employee names without having to insert a name at a time and print a sheet for each employee. Hope it makes sense
 
Thanks for the sheet image.

From past experience I feel there is more to your project than you have already described and this will prevent you receiving an
accurate answer to your question.

Where are the employee names kept ?
How are you maintaining the shift information/hours for each individual employee ?
Does each date in your example image represent a shift ? Or will there be additional data entered to the right of each date ? Where is that data
kept for each employee ?

There are other questions that will arise as you progress with your project.
 
Hi. I have names of the employees on mother Excel sheet. The sample I gave you runs from 1sr Sept to 30th september.itsba simple sheet. No hours, no shifts. The employee manually signs in and out on each day. Very simple
 
Code:
Sub PrintShiftsPreview()
    Dim rCl As Range
    Dim rRng As Range
    With Sheet1
        Set rRng = ActiveWorkbook.Windows(1).Selection.Rows
        For Each rCl In rRng
            With Sheet2
                .Cells(1, 1).Value = rCl.Value
                .PrintPreview
            End With
            
        Next rCl

    End With
  
   With Sheet2
                .Cells(1, 1).Value = ""
   End With
  
End Sub

Sub PrintShiftsAll()
    Dim rCl As Range
    Dim rRng As Range
    With Sheet1
        Set rRng = ActiveWorkbook.Windows(1).Selection.Rows
        For Each rCl In rRng
            With Sheet2
                .Cells(1, 1).Value = rCl.Value
                
            End With
        Next rCl

    End With
    
    With Sheet2
                .Cells(1, 1).Value = ""
    End With
    
End Sub
 

Attachments

  • Print Shift Ledger.xlsb
    17.6 KB · Views: 3
Back
Top