Hi all,
I am getting a "compile error: expected function or variable" when I run the following code. I guess I might be missing something pretty obvious, but I'm sure this code ran fine yesterday, so don't quite get it. If I only have one copy/paste function in the code it seems ok, but can't fathom why this doesn't work.
The code is supposed to work by selecting an array (A1318:A2619 initially), copy and paste it to F12, where it is used to solve a formula residing in O12:O1312. These data are then selected, copied and pasted to S12. The whole procedure is then repeated by using the data in B1318:B2619 (hence the x values), and pasting to T12, etc...
Sub IterationMacro()
'
' IterationMacro Macro
' Macro recorded 11/8/2010 by gre
'
'
Application.ScreenUpdating = False
For x = 0 To 199 Step 1
Range("A1318:A2619").Offset(0, x).Select
Selection.Copy
Range("F12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
Range("O12:O1312").Select
Selection.Copy
Range("S12").Offset(0, x).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Next x
End Sub
Bookmarks