1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Sub Lookup()
NumRow = Worksheets("Blotter").Cells(Worksheets("Blotter").Rows.Count, "B").End(xlUp).Row
With Sheets("Blotter")
For i = 2 To 1653 'NumRow
.Range("AD" & i).Formula = Application.VLookup(.Range("C" & i), Worksheets("Transco").Range("A:G"), 2, 0)
.Range("AE" & i) = Application.VLookup(.Range("C" & i), Worksheets("Transco").Range("A:G"), 3, 0)
.Range("AF" & i) = Application.VLookup(.Range("C" & i), Worksheets("Transco").Range("A:G"), 4, 0)
.Range("AG" & i) = Application.VLookup(.Range("C" & i), Worksheets("Transco").Range("A:G"), 5, 0)
.Range("AH" & i) = Application.VLookup(.Range("G" & i), Worksheets("Rates").Range("A:C"), 3, 0)
.Range("AI" & i) = .Range("H" & i).Value / .Range("AH" & i).Value
Next i
End With
End Sub |
Partager