Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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) "Nigel" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Chip
Thanks for that, I see where I was going wrong! "Chip Pearson" wrote: 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) "Nigel" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating elapsed time | Excel Discussion (Misc queries) | |||
Need Elapsed Time Help | Excel Worksheet Functions | |||
Do when a time and date has elapsed | Excel Discussion (Misc queries) | |||
elapsed time | Excel Worksheet Functions | |||
Elapsed time | Excel Discussion (Misc queries) |