=if ([DeliveryTime]-[SUBMISSION_TIME])<[URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=duration"]#duration[/URL] (0,0,0,0) then [DeliveryTime]-[SUBMISSION_TIME]+[URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=duration"]#duration[/URL] (1,0,0,0) else [DeliveryTime]-[SUBMISSION_TIME]