ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sum Time when not posted as time (https://www.excelbanter.com/excel-programming/420906-sum-time-when-not-posted-time.html)

JenIT

Sum Time when not posted as time
 
I am copying data from a program generated report (no control over
output format). It represents time however...it does not have the
underlying formatting associated with time. I have tried applying all
of the custom time formats and nothing converts this. As this copy,
paste, sum will be part of a macro...I am posting here for some
help.
0:07:04
0:12:30
0:13:50
0:00:00
0:03:37

If I try to key in the same information...after going back this is
what the cell looks like when I try to change...12:12:30 AM but it
displays simply as 00:12:30 - so this data will sum. Mine willl
not.

Is there a way to make the copied data know that it is really time and
should have the correct format?????



Bernard Liengme

Sum Time when not posted as time
 
Your entries are text. Excel stores time as a number (a fraction of a day).
As an experiment I entered '0:07:04 into a cell. The apostrophe, of course,
makes it text and does not display. Next with that cell selected I used Data
| Text to Columns, delimited and in step 3 I specified it to be Date. Excel
does clever things in these circumstances and converted it to 7min 4 sec.
So try selecting a column,n of values and doing the same. Let us know what
happens
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"JenIT" wrote in message
...
I am copying data from a program generated report (no control over
output format). It represents time however...it does not have the
underlying formatting associated with time. I have tried applying all
of the custom time formats and nothing converts this. As this copy,
paste, sum will be part of a macro...I am posting here for some
help.
0:07:04
0:12:30
0:13:50
0:00:00
0:03:37

If I try to key in the same information...after going back this is
what the cell looks like when I try to change...12:12:30 AM but it
displays simply as 00:12:30 - so this data will sum. Mine willl
not.

Is there a way to make the copied data know that it is really time and
should have the correct format?????





JenIT

Sum Time when not posted as time
 
That did it!!! THANKS!!!!!!! Have a good weekend!


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com