#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Time

I have a little problem, that I know you guys can help me with...

I have a column full of Times... they are in the following format:

Column A
0H:8M
9H:39M
14H:46M ... and so on.

What do I need to do to add these,... result should be 24H:33M usin
the forementioned rows??? (scratching head)

Once someone cracks this... I want to create a macro to run thi
operation automatically.

Thanks in advance!
-Larry-
VBA Amateu

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Time

hmmm... a little breakthrough
ColumnA
0H:8M
9H:39M
14H:46M
How do I get 24H:33M ????

Playing around and formatting the four cells (Format=Cells=Numbe
Tab=Time=37:30:55)...
ColumnB
0:08
9:39
14:46
24:33

So now I guess I need to eliminate the H(s) and M(s) add the column an
then add the H(s) and M(s) back again... to get 24H:33M :) gettin
there!!

-Larry-
VBA Amateu

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding Time

format the cell with the sum as

[hh]"H":mm"M"

using format = cells, select the number tab, go to custom

You can format your other cells the same way. Just enter the times like
00:80 9:39 14:46 so they are interpreted as times.

--
Regards,
Tom Ogilvy


"nrage21 " wrote in message
...
hmmm... a little breakthrough
ColumnA
0H:8M
9H:39M
14H:46M
How do I get 24H:33M ????

Playing around and formatting the four cells (Format=Cells=Number
Tab=Time=37:30:55)...
ColumnB
0:08
9:39
14:46
24:33

So now I guess I need to eliminate the H(s) and M(s) add the column and
then add the H(s) and M(s) back again... to get 24H:33M :) getting
there!!

-Larry-
VBA Amateur


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding Time

typo:

Just enter the times like 0:08 9:39 14:46 so they are interpreted as
times.


--
Regards,
Tom Ogilvy



"Tom Ogilvy" wrote in message
...
format the cell with the sum as

[hh]"H":mm"M"

using format = cells, select the number tab, go to custom

You can format your other cells the same way. Just enter the times like
00:80 9:39 14:46 so they are interpreted as times.

--
Regards,
Tom Ogilvy


"nrage21 " wrote in message
...
hmmm... a little breakthrough
ColumnA
0H:8M
9H:39M
14H:46M
How do I get 24H:33M ????

Playing around and formatting the four cells (Format=Cells=Number
Tab=Time=37:30:55)...
ColumnB
0:08
9:39
14:46
24:33

So now I guess I need to eliminate the H(s) and M(s) add the column and
then add the H(s) and M(s) back again... to get 24H:33M :) getting
there!!

-Larry-
VBA Amateur


---
Message posted from http://www.ExcelForum.com/





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Time

Thanks Tom!

It seems we found it at the same time... I had gotten [h]"H":mm"M";
already... I'm working on a macro but I don't want to set a definit
range.

i.e.

Column A
1
2
...to
255
How can I create an inputbox that would ask me for the range??
or know exactly when to stop ???


-Larry-
VBA Amateu

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding Time

On error resume next
set rng = Application.InputBox( _
"Please select range with mouse", type:=8)
On Error goto 0
if not rng is nothing then

--
Regards,
Tom Ogilvy


nrage21 wrote in message
...
Thanks Tom!

It seems we found it at the same time... I had gotten [h]"H":mm"M";@
already... I'm working on a macro but I don't want to set a definite
range.

i.e.

Column A
1
2
..to
255
How can I create an inputbox that would ask me for the range??
or know exactly when to stop ???


-Larry-
VBA Amateur


---
Message posted from http://www.ExcelForum.com/



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Time

I finally have access to the full report (5,400+ rows of data). Most o
the data is unimportant to me except for "Column D". Each cell i
column D is in the following format...

Column D
0H:8M
9H:39M
14H:46M ... and so on.

So all these cells are formatted as [hh]"H":mm"M
(Format=Cells=Number tab=Custom)

Adding these cells is "no problem". The obstacle is that there are
different color cells within column D. I was able to get the exact RG
shade or color (I don't know if this could help).

Color.........R.....G.....B
Green.....204...255..204
Yellow....255...255..153
Red........255...128..128

What I want to accomplish is the following:
Select a range in column D of... let's say 200 rows and have code..
using something like an input box

'...Thanks Tom O
On error resume next
set rng = Application.InputBox( _
"Please select range with mouse", type:=8)
On Error goto 0
if not rng is nothing then

Add total time for Green, Yellow and Red cells... which brings anothe
factor to this whole operation... as time exceeds 24 hours Days ar
created. Therefore, adding 200 rows for example might yield a tota
green cells 4D:14H:46M... Its the 4D (D=days) that I didnt take int
consideration.


I would really be gratefull beyong belief, if anyone can come up with
solution.


Larry
VBA Amateu

--
Message posted from http://www.ExcelForum.com

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
adding time khaled Excel Discussion (Misc queries) 4 November 12th 08 07:53 PM
adding time GrayC011182 Excel Worksheet Functions 2 June 4th 07 08:33 PM
Adding time Steved Excel Worksheet Functions 13 May 17th 07 09:15 AM
Time log adding time from separate sheets teastman New Users to Excel 1 December 31st 05 04:14 PM
Adding time to date-time formatted cell tawtrey(remove this )@pacificfoods.com Excel Discussion (Misc queries) 4 August 12th 05 10:53 PM


All times are GMT +1. The time now is 06:44 AM.

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

About Us

"It's about Microsoft Excel"