Display Elapsed Time

G

Guest

I'm trying to display elapsed time separately so that I can see hours in one
cell and minutes in another cell. I've been using the following to display
hours: =TEXT(MOD(C5-C4,1),"hh"), but when I use the same function and change
the "hh" to "mm", I can't get it to display the minutes correctly. I'm
assuming that it's because of the 2nd argument of the MOD function, it always
displays 01 whatever I type in. Would someone please tell this simple
individual what I'm doing wrong.

Thanks
 
C

Chip Pearson

Nigel,

The problem is that the "mm" text format identifier is used to indicate both
months and minutes. It will format for months unless it follows an "hh"
formatting string. Therefore, the result of your formula is the number of
months, not minutes. Instead, use a formula like the following and format
for General or Number, not date or time.

=(B1-A1)*24*60


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top