Just a quick note to close the loop. I worked out the following solution, and would appreciate any suggestions to make it more efficient. Thanks for everyone's consideration.
Code:Dim rgLife As Range Dim rgDeprec As Range Dim i As Long, j As Long Set rgDeprec = Range(Cells(lRow, 14), Cells(lRow, lColumn)) Set rgLife = Range(Cells(2, 14), Cells(2, lColumn)) For i = 1 To rgLife.Rows.Count For j = 1 To rgLife.Columns.Count If Year(EDate) > Year(rgLife.Cells(i, j).Value) Then Cells(lRow, 11).Copy rgDeprec.Cells(i, j) ElseIf Year(EDate) = Year(rgLife.Cells(i, j).Value) Then rgDeprec.Cells(i, j) = Cells(lRow, 10) - _ WorksheetFunction.Sum(Range(Cells(lRow, 12), Cells(lRow, lColumn))) End If Next j Next i




Reply With Quote
Bookmarks