ExcelTip.com
ExcelTip.com
Account Icon Account Icon Account Icon
Google Exceltip.com
JOIN OUR NEWSLETTER
  and receive for joining:
Free eBook Learn More!
Free Excel ADD-IN
Free Weekly Excel Tip
4 e-books in cd-rom
F1 Formulas & Functions
F1 Formulas & Functions
F1 EXCEL
F1 eBook (Spanish)
F1 EXCEL
Financial Statements.xls
 

» Adding Text Values Representing Time
Problem:

The times listed in column A are formatted as text.
When trying to add them using a simple SUM formula (=SUM(A2:A5)), a false result of 0 is returned.
How can we add text values correctly?

Solution:
Use the SUM and TIMEVALUE functions as shown in the following Array formula:
{=SUM(TIMEVALUE(A2:A5))}

To apply Array formula:
Select the cell, press and simultaneously press .


Rate this tip
12 34 5
  RATING: 1.00
  VIEWS: 10535

READER COMMENTS (view all comments)


not quite....
emvipici wrote on November 28, 2006 06:25 EST
I tryed to solve the problem ur way...
but it doesn't work:

When I use
{=SUM(TIMEVALUE(A2:A5))}
i get the result {#VALUE!}

I tryed another way:
{=SUM(TIMEVALUE(A2):TIMEVALUE(A5))}
I can't even use it, i get an error message.:eek:

can anyone help me ?

10x!

oldchippy wrote on November 28, 2006 08:36 EST
What you need to do is enter the formula in the cell, without the braces

=SUM(TIMEVALUE(A2:A5))

and with the cursor still in the formula bar, press Ctrl + Shift + Enter, then you will see

{=SUM(TIMEVALUE(A2:A5))} in the formula bar
10x
emvipici wrote on November 28, 2006 10:21 EST
Thanks, it worked!

Though, I encountered another problem: I can't add times if it's over 24 hours!

please check it in the image attached.

is there a solution for this ?

oldchippy wrote on November 28, 2006 10:56 EST
Change the format to Custom and format to [hh]:mm:ss, this will add times that total over 24 hours

emvipici wrote on November 28, 2006 11:06 EST
I know this procedure works to display the sum (even if it's grater than 24h), but in my case, still doesn't work!


Does it on tour computer ??? :confused:

oldchippy wrote on November 28, 2006 11:34 EST
Yes, see attached

emvipici wrote on November 29, 2006 02:04 EST
Ah, yes...

but you must keep the same table formats:
time spent [format TEXT]
formula {=SUM (TIMEVALUE(C1:C3))}

In this case, is still working ?
Mine doesn't!

oldchippy wrote on November 29, 2006 04:19 EST
Hello again,

Take a look at this link about adding and subtracting time values, it explains why the value in C5 is not displaying as expected because it is over 24 hours

[url]http://www.cpearson.com/excel/datearith.htm#AddingTimes[/url]

emvipici wrote on November 29, 2006 04:41 EST
The thing is I'm not allowed to change the cell format...
Thanks a lot anywayz!

I'll just have to relay on the fact that there's no time greater than 24h. :(

10x again!



REGISTERED USERS - Click here to post comments


GUESTS (Click here to register)
Name
Comment Title
Comments

Positioning: The Battle for Your Mind

Microsoft Excel 2002 Visual Basic for Applications Step by Step

The 22 Immutable Laws of Marketing : Exposed and Explained by the World's Two

Accounting and Financial Fundamentals for Nonfinancial Executives

Essentials of Accounting and Post Test Booklet 8, Eighth Edition

Microsoft Office XP Step-By-Step (With CD-ROM)

RELATED MICROSOFT EXCEL TIPS


Convert PDF Files to Excel






Excel VBA books
Accounting books
Business Plans
MS Office books
Taxes books

VIEW ALL BOOKS


  Advertise With Us                               

Tips

Add-In in VBA | Applications - Word, Outlook in VBA | Array Formulas | Cells, Ranges, Rows, and Columns in VBA | Counting | Custom Functions | Custom Functions in VBA | Database Formulas | Database in VBA | Date & Time Formulas | Date & Time in VBA | Events in VBA | Excel 2003 | Excel Chart | Excel Consolidating | Excel Counting | Excel Custom Functions using VBA | Excel Customizing | Excel Data | Excel Dates | Excel Editing | Excel Files | Excel Filter | Excel Format | Excel Formula | Excel General | Excel Grouping and Outlining | Excel Importing Text Files | Excel Information | Excel Keyboard Shortcuts | Excel Loan Formulas | Excel Macros - VBA | Excel Pivot Tables | Excel Printing | Excel Range Name | Excel Security - Protection | Excel Sorting | Excel Style | Excel Subtotals | Excel Summing | Excel Text | Excel Time | Excel Tools | Excel Worksheet, Workbook | Files, Workbook, and Worksheets in VBA | Financial Formulas | Formating in VBA | General Topics in VBA | Import and Export in VBA | Information Formulas | Keyboard & Other Shortcuts in VBA | Keyboard Formula Shortcuts | Links between Worksheet and Workbooks | Links in VBA | Logical Formulas | Lookup Formulas | Mail - Send and Receive in VBA | Menus, Toolbars, Status bar in VBA | Modules, Class Modules in VBA | Other Q&A Formulas | Printing in VBA | Protecting in VBA | Summing | Text Formulas | User Forms, Input boxes in VBA | Using Loops | Working with Formulas |

Tips by Version

Microsoft Excel 97 | Microsoft Excel 2000 | Microsoft Excel 2002 | All Microsoft Excel Versions | New in Excel 2002 | New in Excel 2003 - Office 11

Website

Home | Tip of Hour | Recommended Tips | Most Viewed Tips | Tips by Version | Submit a Tip | My Tips
Microsoft Excel Tutorials | Excel Links | Write for Us | About Us | Search Results | Tip Archives | Excel Forum | Excel Forum Archives

Excel Book

Excel 97 Book | Excel 2000 Book | Excel 2002 Book | Excel XP Book | Book Store

Terms and Conditions of use
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Copyright © 2003 ExcelTip.com
Microsoft, Microsoft Excel is a U.S. registered trademark of Microsoft Corporation
Site Developed By: Varien