#1   Report Post  
AJG
 
Posts: n/a
Default Summing Time Data

Hi.
I have numerous schedules (one on each sheet). I also have a Summary sheet
in which I sum the information (linked) on each sheet.
I'm trying to do a SUM function to the time data, but I keep getting zero as
the result. However, if I manually add the data (Sheet1!A1+Sheet2!A1,etc.)
it works.
Again, the data is in time format "h:mm."
Is there anyone out there who knows why the SUM function won't work, but
manual addition will?

Thanks a lot.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

SUM() ignores text, while the + operator will coerce its text arguments
to numeric if it can.

Try coercing your data to actual numeric values (which is how XL stores
times - as fractional days) by copying an empty cell, selecting your
values, choosing Edit/Paste Special, selecting the Values and Add radio
buttons, then clicking OK. Format the result as time.



In article ,
AJG wrote:

Is there anyone out there who knows why the SUM function won't work, but
manual addition will?

  #3   Report Post  
CCW
 
Posts: n/a
Default

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?

"JE McGimpsey" wrote:

SUM() ignores text, while the + operator will coerce its text arguments
to numeric if it can.

Try coercing your data to actual numeric values (which is how XL stores
times - as fractional days) by copying an empty cell, selecting your
values, choosing Edit/Paste Special, selecting the Values and Add radio
buttons, then clicking OK. Format the result as time.



In article ,
AJG wrote:

Is there anyone out there who knows why the SUM function won't work, but
manual addition will?


  #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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
Calculating time between successful data transmissions Donnie Excel Discussion (Misc queries) 2 December 10th 04 12:45 PM
Split combined date time data Mark Ada Excel Discussion (Misc queries) 4 December 1st 04 06:47 PM
Split combined date time data Mark Ada Excel Discussion (Misc queries) 1 December 1st 04 05:55 AM
Split combined date time data Mark Ada Excel Discussion (Misc queries) 1 December 1st 04 03:52 AM


All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"