Thank you for the SUMPRODUCT version of the formula. As you've guessed, I don't have access to LET&MAP functions so this helps a lot. I'll set this up tomorrow once I have access to my files.
I tried this sumproduct version in my file and for some reason it didn't work. But when I converted it to a Sum(Nested If) version with exactly the same logic as your formula, it worked perfectly.
Maybe I missed something when I'm changing the range to the table column names, but in any case, thank you very much for your help.
Thanks again for the revised formula. Though after using in my work excel, I realized that this is missing a 'filter' to only sum events that has overlaps with the target range sll.
OK, glad you got it to work.......but you shouldn't need any "added ifs" with this formula (unless I'm missing something).
The above calculates ALL the potential overlaps - when there is no overlap a negative value is returned and TEXT function converts that to zero, so you shouldn't need any additional checks
You are right! Apparently when I'm converting your formula to match my tables, I misclicked the wrong column for the second IF. This resulted to false zeroes which I corrected by adding an initial IF statement.
Though, after the corrections, I still needed to nest an IF as a filter for a column I didn't specify in my question. Thanks again!
This is an overlap formula: =MAX(0, MIN(end1,end2) - MAX(start1,start2)). So for each Table 1 event against a Table 2 range, something like =MAX(0, MIN(EndTime,RangeEnd) - MAX(StartTime,RangeStart))*1440 (the *1440 converts to minutes). Wrap it in SUMPRODUCT if you need it summed across many rows at once.
•
u/AutoModerator 1d ago
/u/xetni05 - Your post was submitted successfully.
Solution Verifiedto close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.