Grouping dates by certain conditions

Hi there,

I’ve been having trouble grouping dates across two different columns. The challenge is that the Email, Service, Country, and Purpose fields must match for the dates in the Start and End date columns to be grouped. However, if there is even a single day separating the dates in the Start and End columns (e.g., if all required conditions are met, but the end date is 2024-11-12 and the start date is 2024-11-13), they should not be grouped. Data report is large, with huge variety of emails.

Please let me know if this isn’t clear, and I’d be happy to provide further details.

How it is:

How it should be:

Example.xlsx

Huge thanks!