View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Calculate,Copy, Paste Cell Group

I fixed your code to do that. I just added the rand() line for testing.
Take it out and your formula should work

Sub afpaste()
Dim rng As Range, i As Long, j As Long
Dim cell As Range, n As Long, v(1 To 5) As String
Dim s As Long
s = Application.Calculation
Application.Calculation = xlManual
n = 25
Set rng = Range("AF78:AJ78")
v(1) = "AF": v(2) = "AG": v(3) = "AH"
v(4) = "AI": v(5) = "AJ"
For i = 1 To n
Application.Calculate
j = 0
For Each cell In rng
j = j + 1
Cells(i + 80, v(j)).Value = cell.Value
Next
Next
Application.Calculation = s
End Sub


--
Regards,
Tom Ogilvy



wrote in message
oups.com...
sorry dave and tom the formula in AF78:AJ78 is a sum of a preexisting
numbers that change every time the sheet caclulates. all i was trying
to do is copy and paste the results of "AF78:AJ78" which has the
formula "SUM in AF78 to AJ78 then calulate sheet and repeat the copy
and paste down 10,20, 50, 100 times depending on what ever amount i
place in the macro..sorry for the misunderstanding