Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
khurram saddique
 
Posts: n/a
Default how to add time total in msg box

i am having a problem in time total , when i filter the time ie 03:10:25 the
macro add the total in msg box but the format changes ie the total becomes in
msg box is 1.23654654 something like that im using the following macro
i only want the sum of column of rows in msg box not at the end of cell


Sub ad()
Range("F1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-188]C:R[-1]C)"
Selection.NumberFormat = "[h]:mm:ss;@"
MsgBox ActiveCell.Value, vbMsgBoxRtlReading, Sum
End Sub

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Try something like

MsgBox ActiveCell.Text, vbMsgBoxRtlReading, Sum


Regards,

Peo Sjoblom

"khurram saddique" wrote:

i am having a problem in time total , when i filter the time ie 03:10:25 the
macro add the total in msg box but the format changes ie the total becomes in
msg box is 1.23654654 something like that im using the following macro
i only want the sum of column of rows in msg box not at the end of cell


Sub ad()
Range("F1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-188]C:R[-1]C)"
Selection.NumberFormat = "[h]:mm:ss;@"
MsgBox ActiveCell.Value, vbMsgBoxRtlReading, Sum
End Sub

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
entering numbers to display a time format Ian Williams/Eazygig Excel Discussion (Misc queries) 1 January 10th 05 12:57 PM
Time to dollars Atlanta Rudy Excel Discussion (Misc queries) 4 January 7th 05 12:11 PM
Help - Information with time and date PM Excel Discussion (Misc queries) 4 January 6th 05 09:25 AM
how do i set up a single cell continual entry in excel to total f. mike@swallow Excel Discussion (Misc queries) 1 December 7th 04 01:29 PM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 03:48 AM


All times are GMT +1. The time now is 03:10 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"