Thread: .Value "issue"
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default .Value "issue"

Hi Ray,

Am Mon, 29 Jun 2015 10:27:25 -0700 (PDT) schrieb Ray:

They're sub-totals, so I don't want to value them out; users may need to re-update them and putting back the sub-total formulas would be a bit messy.


I don't know what your formula in AG5 is and where your times are and in
which format.
If your times are in AF in format h:mm then try for AG:

Sub Run37Hours()
Dim rngC As Range, myRng As Range
Dim mySum As Double


With Sheets("Sheet2")
.Unprotect
'feed in the values
Set myRng = .Range("AG19, AG21:AG27, AG29:AG35, AG39:AG44, AG47,
AG49, AG52, AG55:AG60, AG63:AG66, AG69, AG73:AG78")
myRng.NumberFormat = "[h]:mm"
For Each rngC In myRng
mySum = mySum + rngC.Offset(, -1)
rngC = mySum
Next

.Protect
End With

End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional