I have time values in two cells in an Excel sheet and I need the difference of the times in minutes.

The cells in the Excel are like below:

   A        B        C
1  6:38     8:23     1:45:00

A is the start time
B is the end time
C is the time difference (B1-A1) which is displayed in hh:mm:ss format

A and B cols are formatted as custom hh:mm and cell C is formatted as custom hh:mm:ss.

But I need to get in the value in cell C1 as 105 instead of 1:45:00.

Could you please help in displaying time only in minutes and giving the right format?

link|improve this question
feedback

migrated from stackoverflow.com Dec 29 '09 at 17:31

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 6 down vote accepted

Just set the cell to be shown in numerical format and it will show a decimal number.

The integer part corresponds to the date value (i.e. the day) and the decimal part to the time of the day.

If you multiply the numerical value of 1:45 (which is 0,07) by 24x60 (the number of hours in a day and the number of minutes in an hour) you will obtain the value in minutes of your cell (105).

link|improve this answer
feedback

I think this will work:

  • A1 6:23
  • B1 8:23
  • C1 =(B1-A1)*24*60

Just make sure you format C1 as "General"

link|improve this answer
feedback

Just format your C cell as hh:mm.

link|improve this answer
feedback

Just format your cell as [mm].

The square brackets around the mm tells Excel to show the total rather than what would be shown if you took the total hours off.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.