The following macro pulls calculated data from another worksheet and then performs a calculation based on that copied over data, then moves down a row and repeats. It is currently set-up to go down 300 rows. I want it to stop after it hits an empty cell in column C, but have not been able to figure it out. Any help is appreciated.
Sub Backlog_Update()
'
' Backlog_Correction Macro
' Backlog Copy from International File.
'
'
Dim startRow As Integer
startRow = 2
endRow = 300
Do
Windows("Daily_DSI_Report.xlsm").Activate
Sheets("LCD").Select
Range("A" & startRow).Select
Selection.Copy
Windows("DASHBOARDS-REPORT.XLS").Activate
Range("T1").Select
ActiveSheet.Paste
Range("V2").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Daily_DSI_Report.xlsm").Activate
Range("AG" & startRow).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B" & startRow).Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=IFERROR(IF(RC[1]-RC[31]<0,0,(RC[1]-RC[31])),0)"
Range("A" & startRow).Select
startRow = startRow + 1
Loop Until startRow > endRow
End Sub
Bookmarks