In order to understand my post, you should see the image below the post
In cell V9 I managed to check the name in B2 with vlookup in student list on the table on the right top and the formula also checks todays date and time with the info on the table and if the time is passed it is increasing the lesson count in the second table on the right side.
But this is only checking the name in B2 on the student list and if it's found, the lesson count is increased. What I want to achieve is a checks every time John is mentioned on the table and if the related time is passed it should increase the lesson count by total amount of times John has a lesson passed. The formula I wrote is : =IF(AND($R$5=$A2;$R$6>B$1)*VLOOKUP(B2:P33;S:T;2;0);T2+1;T2)
What is the formulas I should use for this case ?
If a formula can't solve my question, should I use VBA instead ?
screenshot of the sheet[1]: https://i.sstatic.net/4vb8y2Lj.png