Lookup Multiple tables

I have put together a master employee DB sheet.Table called cours_index contain details on courses.A table with same name as course name will be created for each entry in Index[Course] to capture course details which will be displayed in a new tab with same name of course (Done through macro)

formulea/macro should pick each employee from this DB and count the number of courses he/she attended and update it in employee DB itself.Also each course is attached with specific learning hours . Formulea/Macro should also find the total learning hours of a person and update it in employee DB.As mentioned earlier,Courses will get added dynamically .so Formulea/Macro should take this into consideration.I have attached a file for your review .

Please let me know the macro/Formulea at the earliest

AttachmentSize
Trial_v1.xlsx18.14 KB