View Single Post
  #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