i am making a spread sheet table to auto decide whether a piece of coursework is late and who to decide how much penalty to allocate

i have got the total mar in percentage

the submission date for each student

deadline date

each student is allowed up to 3 weeks to be late each week being a 10% penalty and a total mark of 0 after the 3rd week.

i can email you what i have come up with so far any advice would be welcome

thank you