After a deeper analysis of your scenario.
Here a few thoughts
- I'm joining our colleague Minhokiller in his comments, although I do understand the meaning of the CAP, I think we need to know, how you implement it, so please clarify it?
- I'm obviously not familiar with the payroll basis/payment methods/policies/rules and work entitlements in your country
I just simply follow my logic in this case.
If the BASIC Salary (column L) represents the basic monthly salary for an employee.
According to your formula calculations/logic, none of the employees will ever get their full BASIC Salary before any tax (%) deductions.
Employees will have to work every day without having any day-off (commonly weekends) in order to get their full BASIC salary payment
Example.
The month of June 2021 had
22 working days (Monday to Friday) and 8 days off (Saturday-Sunday)/(weekends)
In the picture:
Employees SI No. 1, 4, 7, and 8, worked 24 days in the month, they should be entitled to get their full BASIC monthly salary plus two extra days of their salary worth. (obviously before any tax % deductions)
So to calculate the employee Daily Salary the logic should be,
BASIC Monthly salary multiplied by Year Months (12) divided by Total working days in a calendar year
The Total working days in a calendar year varies in every country depending on their customs and established rules and public holidays.
In my humble opinion here is a simplified sample of the calculations according to your scenario.
Payment (before deductions and CAP) =$K4*$L4*12/252
Payment (after % deductions) =$M4*VLOOKUP($L4,CAPtable,2,TRUE)

Again
Please, clarify how the CAP works so we could provide you with the full answer to your question
Regards
Jeovany