Subtracting Times in Microsoft Excel

Follow by Email
Facebook
Facebook
Google+
http://www.exceltip.com/excel-date-time-formulas/subtracting-times.html
SHARE




To determine which of two values is the earliest and then Excel subtracting time  accordingly. We will use If function to create subtracting time calculator in Excel.

IF: - Check whether a condition is met and returns one value if True and another value if False.

Syntax of “IF” function =if(logical test,[value_if_true],[value_if_false])

First the formula will do the logical test, what if the output of logical test is true and false.

For example:Cell A2 and A3 contain the number 3 and 5. Ifthe number is 3, the formula should display “Yes” else “No”.

=IF (A1=3,”Yes”,”No”)

img1

Let’s take an example to understand how we can subtract the times.

We have 2 time lists in range A1:B4 in which Column A contains Time 1 and column B contains Time 2. To find the interval between each pair of start and end time is earlier than the start time, thereby resulting in negative result.

img2

To subtract the times,follow below given steps:-

  • Write the formula in cell C2.
  • =B2-A2+IF(A2>B2,1)
  • PressEnter on your keyboard.
  • The function will return the time difference between two values.
  • Copy the same formula and paste in the range C3:C4.

img3

This is the way we can subtract the times by using the IF function in Microsoft Excel.

Please follow and like us:
0


One thought on “Subtracting Times in Microsoft Excel

Leave a Reply

Your email address will not be published. Required fields are marked *

To avoid automated spam,Please enter the value *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>