View Single Post
  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

By using TEXT(F2-E2,"[h]:mm"), you are creating a Text string which is
stored in your cell, not a time value. XL stores time values as
fractional days, so, for example, 3:00:00 is stored as 0.125, and
30:00:00 = 1.25.

Your formula, however, does not get converted to a number, because you
use "Text"

Better to use

=IF(F2="","",F2-E2)

and FORMAT the cell as [h]:mm.

My instructions for coercing text to numbers takes advantage of the fact
that XL will try to convert your text "time" into a real time if it's
involved in a math operation. By selecting the Add radio button after
copying an empty cell, you're effectively adding zero to each cell in
the selection. This coerces your text entries to real numbers, which you
then should format as [h]:mm.




In article ,
CCW wrote:

I don't understand this answer. I have a column of times, summing to zero.
I have tried the formula, SUM(G2:G10)*24, formatting the cell [h]:mm, both
found in the help menu. I have tried the formula with the + operator as
suggested here. Nothing works.

The times being summed are a result of IF(F2="","",TEXT(F2-E2,"[h]:mm")), I
have also taken the bracets off the h, but then loose + 24hour periods. What
does add radio buttons do?