Excel Formulas to Calculate Total Hours that Fall Between Two Times!!

For instance, you need to calculate the total hours between two-time ranges in Excel. How could you get them quickly? Today I introduce you to some formulas to solve this problem. Let’s get into the article!! Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel
General Formula:
  • If you want to calculate the total number of hours between a start and end time that overlap a period of interest with a given start and end time, you can use the below formula.
  • =IF(B5<C5,MAX(0,MIN(C5,upper)-MAX(B5,lower)),MAX(0,upper-B5)+MAX(0,C5-lower))
    Syntax Explanations:
  • IF – The Excel IF Function will help to return one value for a TRUE result, and another for a FALSE result.
  • MAX – This function returns the largest numeric value from the range of input values. Read more on the MAX function.
  • MIN – In Excel, the MIN Function returns the smallest numeric value from the range of input values.
  • Minus Operator (-) – This symbol will help to subtract any two values.
  • Comma symbol (,) – It is a separator that helps to separate a list of values.
  • Parenthesis () – The main purpose of this symbol is to group the elements.
  • Practical Example:
    Let’s consider the below example image.
  • Here, we will enter the input values in Column B and Column C.
  • Now we are going to find out the total number of hours between a start and end time.
  • Select any cell and type the above-given formula.
  • Finally, press ENTER to get the result out, if you need, drag the fill handle over range to apply the formula.
  • Verdict:
    From this short tutorial, you can get some clarification on how to calculate the total hours that fall between two times in Excel. I hope you like this article. Let me know if you have any doubts regarding this article or any other Excel/VBA topic.
    Thank you so much for visiting *Geek Excel!! **If you want to learn more helpful formulas, check out Excel Formulas *!! **
    Related Articles:

    27

    This website collects cookies to deliver better user experience

    Excel Formulas to Calculate Total Hours that Fall Between Two Times!!