Hello Mr. Akshat,
Form 24Q will be generated for all company codes under which the employee has worked in a quarter. You simply have to run Form 24Q for all the company codes in which the employee worked and each time, Form 24Q will pick up the payroll results from the payroll cluster for each company code. There are no real configuration steps involved in this case and Form 24Q will automatically pick up the data.
Best Regards,
Aman