I have up to 17 different sets of clock in and clock out times per day over a 6 year period. I’m attempting to write a VBA to calculate the overlap between all groups of punches for the same day.

I have 17 different xxxIN dictionaries, and I’d like to automate the process of checking each one against each other for every single date. Here is the code I created manually to show what I want to do, but with 17 different dictionaries, it’s going to be a massive bit of code to have each xxxIN dictionary checked against every other xxxIN dictionary if I have to write it out individually like this.

Is there a way to automate this via a loop or something so that I don’t have to write this same bit of if code over and over and over and over and…

Please Login or Register  to view this content.
To further complicate matters, the formula being constructed based on the existence of multiple punches on the same day is:

Please Login or Register  to view this content.
but changing out the cell references based upon which two dictionaries (people) I’m comparing the punches against.

Here's hoping you can show me a way to automate this better. Thanks!