How I calculate HH:mm

Julie@WD
Julie@WD ✭✭✭✭
edited 03/12/24 in Best Practice

Here's how I figured out HH:mm. I welcome all simplification suggestions.

The combined formula in A38 is this monstrosity (but it works):

=IFERROR(IF(INT(SUMIFS({Duration}, {CURWK}, 1, {Event Type}, A$37) / 60) < 10, "0" + INT(SUMIFS({Duration}, {CURWK}, 1, {Event Type}, A$37) / 60), INT(SUMIFS({Duration}, {CURWK}, 1, {Event Type}, A$37) / 60)) + ":" + IF(MOD(SUMIFS({Duration}, {CURWK}, 1, {Event Type}, A$37), 60) < 10, "0" + MOD(SUMIFS({Duration}, {CURWK}, 1, {Event Type}, A$37), 60), MOD(SUMIFS({Duration}, {CURWK}, 1, {Event Type}, A$37), 60)), "00:00")

----------------------------------------------------

{CURWK} - checkbox in data source indicating whether the event is "this" week

{Event Type} - single-select dropdown column in data source indicating the type of event

{Duration} - text/number column in data source with #minutes for each event