EXCEL

Solved/Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
hi i always make our employee salary in excel. this file is very big. every month I have to put only OVER TIME,WORKING DAY and ABSENT...and i make all salary by formula..Whenever i have to make payslip( this is the one setting page..which is printing in one page all detail and we have to get signature from employee) one by one .in this case i make one column for serial number and i use in this pay slip VLOOKUP in one cell when i put the serial in this cell, pay slip will change and direct print out.... but i took so long time because i have to put one by one number ( 1,2,3,4,....) i want to know there is some way to all pay slip in one time, same this progress..(Like i set print from 1-1200number in one time )?
Thanks....this will be really helpful for me

2 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Could you please upload a sample file with sample data etc on some shared site like https://authentification.site and post back here the link to allow better understanding of how it is now and how you foresee.
i already send you my file please check this frm speedyshare.com
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Could you please upload a sample file with sample data etc on some shared site like https://authentification.site and post back here the link to allow better understanding of how it is now and how you foresee.
https://authentification.site/files/22409701/New_folder_-_Copy.zip
Sheet 2 E1 ,is my Base for pay slip. Vlookup base is sheet1
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Try this


Sub PrintBatch() 
Dim lMaxRows As Long 
     
    lMaxRows = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row 
     
        
    For SLIP = 2 To lMaxRows 
     
        Sheets("Sheet2").Select 
        Cells(1, "J") = Sheets("Sheet1").Cells(SLIP, "A").Value 
        DoEvents 
        ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" 
        DoEvents 
    Next SLIP 

End Sub