Hi,
I have some inefficient code that I know can be turned into a loop. I am not sure how to do this though. This is an example of a few lines of the code:
Range("D8").Select
Application.CutCopyMode = False
Selection.Copy
Range("C19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D8").Select
Application.CutCopyMode = False
Selection.Copy
Range("C20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
....so on and so forth. The problem is I get to about 1500 lines of this repeated (all the way down to Range("C250~").Select and I receive a compile error saying "procedure too large" (unsurprisingly).
I think this could be turned into a loop formula and then i could set the limit of the copy and paste results manually. And from what i understand, this would only involve very few lines of code (modifications of the code I have).
Can anybody help me with this?
Thanks
I have some inefficient code that I know can be turned into a loop. I am not sure how to do this though. This is an example of a few lines of the code:
Range("D8").Select
Application.CutCopyMode = False
Selection.Copy
Range("C19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D8").Select
Application.CutCopyMode = False
Selection.Copy
Range("C20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
....so on and so forth. The problem is I get to about 1500 lines of this repeated (all the way down to Range("C250~").Select and I receive a compile error saying "procedure too large" (unsurprisingly).
I think this could be turned into a loop formula and then i could set the limit of the copy and paste results manually. And from what i understand, this would only involve very few lines of code (modifications of the code I have).
Can anybody help me with this?
Thanks