View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
bforster1[_31_] bforster1[_31_] is offline
external usenet poster
 
Posts: 1
Default Please look at the code


The "activate" guidance worked now the problem I am having is that the
macro stops half way through my 500 rows of data.

As for the output = model code...I am taking the results of the
financial model for each row of data and putting it in seperate rows on
the output sheet.

Here is what I have ... any suggestions why the macro stops half way
through my 500 rows of data?

Sub Model()
iTarget = 6
For i = 6 To Cells(Rows.Count, "A").End(xlUp).Row
Worksheets("Working Data").Activate
Cells(i, "A").Resize(, 30).Select
Selection.Copy
Worksheets("Model").Activate
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues
Worksheets("Output").Cells(i, "A") =
Worksheets("Model").Range("B17")
Worksheets("Output").Cells(i, "B") =
Worksheets("Model").Range("B18")
Worksheets("Output").Cells(i, "C") =
Worksheets("Model").Range("B8")
iTarget = iTarget + 1
Next i
End Sub


--
bforster1
------------------------------------------------------------------------
bforster1's Profile: http://www.excelforum.com/member.php...o&userid=11771
View this thread: http://www.excelforum.com/showthread...hreadid=563367