I am dealing with an attendance sheet. And I'm having a problem with how to change the total number of students attended. And since I'm dealing with dates, I've tried extracting the DAYS where a certain student left school. Now the problem is the total number of students attended does not conform with the supposed actual students present since a student left.

To further explain the scenario, I have attached a sample sheet below.

Thank you

sample attendance sheet.xlsx