I am an external auditor he spends most of his time working on excel. I will not make a macro for you. Instead, after understanding your needs, I will make a sheet contains some formulas that give you the information needed based on the raw data provided.
If you need any clarification, please do not hesitate to contact me.
Regards,