I need help editing a formula that I got from another post from Dave Hawley - the code works perfectly for what I am looking for. However the formula I need is an average formula that converts the average to a time value. This is the formula that I use however, I need to keep changing it as my ranges change, so I want to add a vba code that will do this automatically
[TABLE="width: 633"]
[TABLE="width: 633"]
=INT(AVERAGE($H$2:$H$29)) & "." & RIGHT("0" & ROUND(MOD(AVERAGE($H$2:$H$29)*60,60),0),2)
How can I replace the above formula to the formula below "=Sum(" & strAddress & ")"
[/td][/tr]
[/TABLE]
[/TABLE]
Code
Sub SumUp()
Dim strAddress As String
strAddress = _
Range("A1", Range("A65536").End(xlUp)).Address
If Range(strAddress).Cells.Count > 1 Then
Range("A65536").End(xlUp).Offset(1, 0).Formula = _
"=Sum(" & strAddress & ")"
End If
End Sub
Display More
Appreciate any help or suggestion - Monti