adding decimal time

R

rbobcat

I have access database that keeps track of time spent performing a task.
I export the table to excel and attempt to add the “time_spent†(Decimal)
column as hours/minutes.
The problem is how I add this decimal column and it treat the answer as time?
Example;
1.20 would be 1 h 20 m
..45 would be 45 m
But when I add this it returns 1.65 instead of 2.05
 
R

Rick Rothstein

Assuming your "times" are in Column A and run from Row 2 to no more than Row
1000 (if you have different limits, change the 2 ranges in the formula to
reflect them), then this array-entered** formula will return the value you
seek...

=--SUBSTITUTE(TEXT(SUM(INT(A2:A1000)+TEXT(100*MOD(A2:A1000,1),"00")/60)/24,"h:mm"),":",".")

**Commit this formula using Ctrl+Shift+Enter, not just Enter by itself

As written, the formula returns a numeric value (which really will have no
numerical significance in any calculation you might try to use it in as it
is NOT a real time value). If you want the formula to simply return a text
value, remove the 2 minus sign after the equal sign.
 

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