More details are needed. Mainly which data from the master sheet needs to go where on the payslip?
Just some questions that came to my mind:
Is each row on the master sheet info for each payslip?
Do you have 1 payslip which you fill with data, then print, fill with another set of data etc...? Or is 1 payslip 1 sheet?